From b436dffb23aaf45c2a404ca4f9a1958569faa7ac Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 24 Apr 2024 09:00:19 -0300 Subject: [PATCH] docs: document generics --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 5b3b350..2caedeb 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,12 @@ func main() { fmt.Printf("%+v\n", err) } + // or you can use generics + cfg, err := env.ParseAs[config]() + if err != nil { + fmt.Printf("%+v\n", err) + } + fmt.Printf("%+v\n", cfg) } ```