Skip to content

Commit

Permalink
chore: fight against typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoVeille committed Jan 18, 2025
1 parent a197221 commit 72f14df
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion docs/advanced-guide/handling-file/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ for reader.Next() {
var b string

// For reading CSV/TEXT files user need to pass pointer to string to SCAN.
// Incase of JSON user should pass structs with JSON tags as defined in encoding/json.
// In case of JSON user should pass structs with JSON tags as defined in encoding/json.
err = reader.Scan(&b)

fmt.Println(b)
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-guide/publishing-custom-metrics/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ By effectively using labels in GoFr, you can enrich your custom metrics and gain
### Usage:

Labels are added while populating the data for metrics, by passing them as arguments (comma separated key-value pairs)
in the GoFr's methods (namely: `IncreamentCounter`, `DeltaUpDownCounter`, `RecordHistogram`, `SetGauge`).
in the GoFr's methods (namely: `IncrementCounter`, `DeltaUpDownCounter`, `RecordHistogram`, `SetGauge`).

Example: `c.Metrics().IncrementCounter(c, "metric-name", "metric-value", "label-1", "value-1", "label-2", "value-2")`

Expand Down
2 changes: 1 addition & 1 deletion pkg/gofr/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (c *Container) createMqttPubSub(conf config.Config) pubsub.Client {
if err != nil {
keepAlive = 30 * time.Second

c.Logger.Debug("MQTT_KEEP_ALIVE is not set or ivalid, setting it to 30 seconds")
c.Logger.Debug("MQTT_KEEP_ALIVE is not set or invalid, setting it to 30 seconds")
}

switch conf.Get("MQTT_QOS") {
Expand Down
2 changes: 1 addition & 1 deletion pkg/gofr/datasource/cassandra/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Logger interface {
Log(args ...interface{})
Logf(pattern string, args ...interface{})
Error(args ...interface{})
Errorf(patter string, args ...interface{})
Errorf(pattern string, args ...interface{})
}

type QueryLog struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/gofr/datasource/cassandra/mock_logger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/gofr/datasource/clickhouse/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Logger interface {
Debugf(pattern string, args ...interface{})
Debug(args ...interface{})
Logf(pattern string, args ...interface{})
Errorf(patter string, args ...interface{})
Errorf(pattern string, args ...interface{})
}

type Log struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/gofr/datasource/clickhouse/mock_logger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/gofr/datasource/kv-store/badger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Logger interface {
Info(args ...any)
Infof(pattern string, args ...any)
Error(args ...any)
Errorf(patter string, args ...any)
Errorf(pattern string, args ...any)
}

type Log struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/gofr/datasource/kv-store/badger/mock_logger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/gofr/datasource/opentsdb/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type SubQuery struct {
// The value is required with non-empty one in the range of
// the response of calling /api/aggregators.
//
// By default, the potential values and corresponding descriptions are as followings:
// By default, the potential values and corresponding descriptions are as following:
// "sum": Adds all of the data points for a timestamp.
// "min": Picks the smallest data point for each timestamp.
// "max": Picks the largest data point for each timestamp.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gofr/datasource/opentsdb/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ type QueryLastResponse struct {
// It holds the response item defined in the
// [OpenTSDB Official Docs]: http://opentsdb.net/docs/build/html/api_http/query/last.html.
type QueryRespLastItem struct {
// Name of the metric retreived for the time series.
// Name of the metric retrieved for the time series.
// Only returned if resolve was set to true.
Metric string `json:"metric"`

Expand Down
2 changes: 1 addition & 1 deletion pkg/gofr/datasource/pubsub/eventhub/eventhub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestConnect_ContainerError(t *testing.T) {
func TestPublish_FailedBatchCreation(t *testing.T) {
// TODO: This test is skipped due to long runtime and occasional panic, causing pipeline failures.
// It needs modification in the future.
t.Skip("disbled on 2024-12-11, TODO: cause of occasional panic in this test needs to be addressed.")
t.Skip("disabled on 2024-12-11, TODO: cause of occasional panic in this test needs to be addressed.")

ctrl := gomock.NewController(t)

Expand Down
2 changes: 1 addition & 1 deletion pkg/gofr/datasource/solr/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Logger interface {
Info(args ...any)
Infof(pattern string, args ...any)
Error(args ...any)
Errorf(patter string, args ...any)
Errorf(pattern string, args ...any)
}

type QueryLog struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/gofr/datasource/solr/mock_logger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/gofr/logging/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ func (l *logger) Fatalf(format string, args ...interface{}) {
}

func (l *logger) prettyPrint(e logEntry, out io.Writer) {
// Note: we need to lock the pretty print as printing to stdandard output not concurency safe
// the logs when printed in go routines were getting missaligned since we are achieveing
// a single line of log, in 2 separate statements which caused the missalignment.
// Note: we need to lock the pretty print as printing to standard output not concurrency safe
// the logs when printed in go routines were getting misaligned since we are achieving
// a single line of log, in 2 separate statements which caused the misalignment.
l.lock <- struct{}{} // Acquire the channel's lock
defer func() {
<-l.lock // Release the channel's token
Expand Down
2 changes: 1 addition & 1 deletion pkg/gofr/metrics/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// Error can also be returned from all the methods, but it is decided not to do so such that to keep the usage clean -
// as any errors are already being logged from here. Otherwise, user would need to check the error everytime.
// as any errors are already being logged from here. Otherwise, user would need to check the error every time.

// Manager defines the interface for registering and interacting with different types of metrics
// (counters, up-down counters, histograms, and gauges).
Expand Down
4 changes: 2 additions & 2 deletions pkg/gofr/websocket/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type ConnectionHub struct {
WebSocketConnections map[string]*Connection
}

// New intializes a new websocket manager with default websocket upgrader.
// New initializes a new websocket manager with default websocket upgrader.
func New() *Manager {
return &Manager{
WebSocketUpgrader: NewWSUpgrader(),
Expand All @@ -110,7 +110,7 @@ func (u *WSUpgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHea
return u.Upgrader.Upgrade(w, r, responseHeader)
}

// GetWebsocketConnection returns a websocket connection which has been intialized in the middleware.
// GetWebsocketConnection returns a websocket connection which has been initialized in the middleware.
func (ws *Manager) GetWebsocketConnection(connID string) *Connection {
ws.mu.Lock()
defer ws.mu.Unlock()
Expand Down

0 comments on commit 72f14df

Please sign in to comment.