From d5e2ac52224886b2ab0fed66dd1cc165bc396c1c Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Fri, 18 Aug 2023 16:29:46 +0300 Subject: [PATCH] docs: fix typos in comments --- README.md | 2 +- flags.go | 2 +- internal/encoding/dotenv/map_utils.go | 2 +- internal/encoding/ini/map_utils.go | 2 +- internal/encoding/javaproperties/map_utils.go | 2 +- logger.go | 2 +- viper_test.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f4f1e7639..738d828b3 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flags.go b/flags.go index b5ddbf5d4..ddb4da602 100644 --- a/flags.go +++ b/flags.go @@ -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 diff --git a/internal/encoding/dotenv/map_utils.go b/internal/encoding/dotenv/map_utils.go index e880c95aa..aeb6b8722 100644 --- a/internal/encoding/dotenv/map_utils.go +++ b/internal/encoding/dotenv/map_utils.go @@ -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 { diff --git a/internal/encoding/ini/map_utils.go b/internal/encoding/ini/map_utils.go index f39e95de4..4fb9eb117 100644 --- a/internal/encoding/ini/map_utils.go +++ b/internal/encoding/ini/map_utils.go @@ -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 { diff --git a/internal/encoding/javaproperties/map_utils.go b/internal/encoding/javaproperties/map_utils.go index 673bb700b..eb5379089 100644 --- a/internal/encoding/javaproperties/map_utils.go +++ b/internal/encoding/javaproperties/map_utils.go @@ -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 { diff --git a/logger.go b/logger.go index a64e1446c..3f69e9841 100644 --- a/logger.go +++ b/logger.go @@ -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{}) } diff --git a/viper_test.go b/viper_test.go index e0bfc57bd..1947d8d90 100644 --- a/viper_test.go +++ b/viper_test.go @@ -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)