You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ Here remote host and port may change in a distributed system architecture. Field
141
141
142
142
### Description
143
143
144
-
You can get descriptions of all environment variables to use them in help documentation.
144
+
You can get descriptions of all environment variables to use them in the help documentation.
145
145
146
146
```go
147
147
import github.com/ilyakaznacheev/cleanenv
@@ -169,10 +169,11 @@ Environment variables:
169
169
170
170
## Model Format
171
171
172
-
Library uses tags to configure model of configuration structure. There are following tags:
172
+
Library uses tags to configure the model of configuration structure. There are the following tags:
173
173
174
174
-`env="<name>"` - environment variable name (e.g. `env="PORT"`);
175
175
-`env-upd` - flag to mark a field as updatable. Run `UpdateEnv(&cfg)` to refresh updatable variables from environment;
176
+
-`env-required` - flag to mark a field as required. If set will return an error during environment parsing when the flagged as required field is empty (default Go value). Tag `env-default` is ignored in this case;
176
177
-`env-default="<value>"` - default value. If the field wasn't filled from the environment variable default value will be used instead;
177
178
-`env-separator="<value>"` - custom list and map separator. If not set, the default separator `,` will be used;
0 commit comments