diff --git a/README.md b/README.md index 7ced03d..697ec76 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # struct2env -Convert between go structures to environment variable and back (for structured config <-> shell env) +Convert between go structures to environment variables and back (for structured config <-> shell env) There are many go packages that are doing environment to go struct config (for instance https://github.com/kelseyhightower/envconfig) but I didn't find one doing the inverse and we needed to set a bunch of environment variables for shell and other tools to get some configuration structured as JSON and Go object, so this was born. For symetry the reverse was also added (history of commit on https://github.com/fortio/dflag/pull/50/commits) @@ -34,5 +34,6 @@ TST_INT_POINTER="199" Using ```go -struct2env.ToShellWithPrefix("TST_", struct2env.StructToEnvVars(foo)) +kv, errs := struct2env.StructToEnvVars(foo) +struct2env.ToShellWithPrefix("TST_", kv) ```