From a279f661665ef98b03ea522c48efccbf7d4d41ec Mon Sep 17 00:00:00 2001 From: Inhere Date: Fri, 13 Oct 2023 19:57:01 +0800 Subject: [PATCH] :memo: doc: update and re-generate README docs --- README.md | 13 ++++++++++++- README.zh-CN.md | 13 ++++++++++++- internal/template/README.md.tpl | 10 ++++++++++ internal/template/README.zh-CN.md.tpl | 10 ++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bcddd4984..b9747fa47 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,16 @@ i64Val = goutil.Int64("-2") // -2 u64Val = goutil.Uint("2") // 2 ``` +### Dump go variable + +```go +dump.Print(somevar, somevar2, ...) +``` + +**dump nested struct** + +![preview-nested-struct](dump/_examples/preview-nested-struct.png) + ## Packages ### Array and Slice @@ -457,9 +467,10 @@ func B64DecodeBytes(str []byte) []byte ```go // source at envutil/envutil.go func VarReplace(s string) string +func ParseOrErr(val string) (string, error) +func ParseValue(val string) string func VarParse(val string) string func ParseEnvValue(val string) string -func ParseValue(val string) (newVal string) func SetEnvMap(mp map[string]string) func SetEnvs(kvPairs ...string) func UnsetEnvs(keys ...string) diff --git a/README.zh-CN.md b/README.zh-CN.md index 5c19948d2..318d4976d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -85,6 +85,16 @@ i64Val = goutil.Int64("-2") // -2 u64Val = goutil.Uint("2") // 2 ``` +### Dump go variable + +```go +dump.Print(somevar, somevar2, ...) +``` + +**dump nested struct** + +![preview-nested-struct](dump/_examples/preview-nested-struct.png) + ## Packages ### Array and Slice @@ -456,9 +466,10 @@ func B64DecodeBytes(str []byte) []byte ```go // source at envutil/envutil.go func VarReplace(s string) string +func ParseOrErr(val string) (string, error) +func ParseValue(val string) string func VarParse(val string) string func ParseEnvValue(val string) string -func ParseValue(val string) (newVal string) func SetEnvMap(mp map[string]string) func SetEnvs(kvPairs ...string) func UnsetEnvs(keys ...string) diff --git a/internal/template/README.md.tpl b/internal/template/README.md.tpl index 80edb3507..28aa49817 100644 --- a/internal/template/README.md.tpl +++ b/internal/template/README.md.tpl @@ -86,6 +86,16 @@ i64Val = goutil.Int64("-2") // -2 u64Val = goutil.Uint("2") // 2 ``` +### Dump go variable + +```go +dump.Print(somevar, somevar2, ...) +``` + +**dump nested struct** + +![preview-nested-struct](dump/_examples/preview-nested-struct.png) + ## Packages {{pgkFuncs}} ## Code Check & Testing diff --git a/internal/template/README.zh-CN.md.tpl b/internal/template/README.zh-CN.md.tpl index eaf1e6c6e..56c56b56b 100644 --- a/internal/template/README.zh-CN.md.tpl +++ b/internal/template/README.zh-CN.md.tpl @@ -85,6 +85,16 @@ i64Val = goutil.Int64("-2") // -2 u64Val = goutil.Uint("2") // 2 ``` +### Dump go variable + +```go +dump.Print(somevar, somevar2, ...) +``` + +**dump nested struct** + +![preview-nested-struct](dump/_examples/preview-nested-struct.png) + ## Packages {{pgkFuncs}} ## Code Check & Testing