Skip to content

Commit

Permalink
docs: fix typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Aug 18, 2023
1 parent b77f4c1 commit d5e2ac5
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ if err := viper.ReadInConfig(); err != nil {
// Config file found and successfully parsed
```

*NOTE [since 1.6]:* You can also have a file without an extension and specify the format programmaticaly. For those configuration files that lie in the home of the user without any extension like `.bashrc`
*NOTE [since 1.6]:* You can also have a file without an extension and specify the format programmatically. For those configuration files that lie in the home of the user without any extension like `.bashrc`

### Writing Config Files

Expand Down
2 changes: 1 addition & 1 deletion flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (p pflagValueSet) VisitAll(fn func(flag FlagValue)) {
})
}

// pflagValue is a wrapper aroung *pflag.flag
// pflagValue is a wrapper around *pflag.flag
// that implements FlagValue
type pflagValue struct {
flag *pflag.Flag
Expand Down
2 changes: 1 addition & 1 deletion internal/encoding/dotenv/map_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// flattenAndMergeMap recursively flattens the given map into a new map
// Code is based on the function with the same name in tha main package.
// Code is based on the function with the same name in the main package.
// TODO: move it to a common place
func flattenAndMergeMap(shadow map[string]interface{}, m map[string]interface{}, prefix string, delimiter string) map[string]interface{} {
if shadow != nil && prefix != "" && shadow[prefix] != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/encoding/ini/map_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func deepSearch(m map[string]interface{}, path []string) map[string]interface{}
}

// flattenAndMergeMap recursively flattens the given map into a new map
// Code is based on the function with the same name in tha main package.
// Code is based on the function with the same name in the main package.
// TODO: move it to a common place
func flattenAndMergeMap(shadow map[string]interface{}, m map[string]interface{}, prefix string, delimiter string) map[string]interface{} {
if shadow != nil && prefix != "" && shadow[prefix] != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/encoding/javaproperties/map_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func deepSearch(m map[string]interface{}, path []string) map[string]interface{}
}

// flattenAndMergeMap recursively flattens the given map into a new map
// Code is based on the function with the same name in tha main package.
// Code is based on the function with the same name in the main package.
// TODO: move it to a common place
func flattenAndMergeMap(shadow map[string]interface{}, m map[string]interface{}, prefix string, delimiter string) map[string]interface{} {
if shadow != nil && prefix != "" && shadow[prefix] != nil {
Expand Down
2 changes: 1 addition & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Logger interface {
//
// Critical events that require immediate attention.
// Loggers commonly provide Fatal and Panic levels above Error level,
// but exiting and panicing is out of scope for a logging library.
// but exiting and panicking is out of scope for a logging library.
Error(msg string, keyvals ...interface{})
}

Expand Down
2 changes: 1 addition & 1 deletion viper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ clothing:

func TestDotParameter(t *testing.T) {
initJSON()
// shoud take precedence over batters defined in jsonExample
// should take precedence over batters defined in jsonExample
r := bytes.NewReader([]byte(`{ "batters.batter": [ { "type": "Small" } ] }`))
unmarshalReader(r, v.config)

Expand Down

0 comments on commit d5e2ac5

Please sign in to comment.