mirror of
https://github.com/spf13/viper.git
synced 2024-04-21 12:31:38 +00:00
docs: fix typos in comments
This commit is contained in:
committed by
Márk Sági-Kazár
parent
c63105849f
commit
a0696bbc97
@@ -141,7 +141,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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{})
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user