| 178 | // some other kind of logic. |
| 179 | func ExampleParseWithOptions_onSet() { |
| 180 | type config struct { |
| 181 | Home string `env:"HOME,required"` |
| 182 | Port int `env:"PORT" envDefault:"3000"` |
| 183 | IsProduction bool `env:"PRODUCTION"` |
| 184 | NoEnvTag bool |
| 185 | Inner struct{} `envPrefix:"INNER_"` |
| 186 | } |
| 187 | os.Setenv("HOME", "/tmp/fakehome") |
| 188 | var cfg config |
| 189 | if err := ParseWithOptions(&cfg, Options{ |
nothing calls this directly
no outgoing calls
no test coverage detected