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
Sometimes you don't want to use configuration files at all, or you may want to use `.env` file format instead. Thus, you can limit yourself with only reading environment variables:
95
100
96
-
```go
97
-
import"github.com/ilyakaznacheev/cleanenv"
101
+
```go
102
+
import"github.com/teeaa/cleanenv"
98
103
99
104
typeConfigDatabasestruct {
100
105
Portstring`env:"PORT" env-default:"5432"`
@@ -117,7 +122,7 @@ if err != nil {
117
122
Some environment variables may change during the application run. To get the new values you need to mark these variables as updatable with the tag `env-upd` and then run the update function:
118
123
119
124
```go
120
-
import"github.com/ilyakaznacheev/cleanenv"
125
+
import"github.com/teeaa/cleanenv"
121
126
122
127
typeConfigRemotestruct {
123
128
Portstring`env:"PORT" env-upd`
@@ -144,7 +149,7 @@ Here remote host and port may change in a distributed system architecture. Field
144
149
You can get descriptions of all environment variables to use them in the help documentation.
-`env-layout="<value>"` - parsing layout (for types like `time.Time`);
181
186
-`env-prefix="<value>"` - prefix for all fields of nested structure (only for nested structures);
187
+
-`gcp_secret="projects/<project_id>/secrets/<secret_id>/versions/<version_id>"` - flag for GCP secrets, this tag will hold the full resource name of the secret version. You can use latest for the `version_id` to always get the newest version;
188
+
-`aws_secret-"<secret_name_or_arn>"` - flag for AWS secrets, this tag will hold the name or ARN of the secret;
182
189
183
190
## Supported types
184
191
@@ -265,7 +272,7 @@ You can use the cleanenv help together with Golang `flag` package.
0 commit comments