a0v0

Results 53 comments of a0v0

@kevwan currently if want to read a value from env we have to first specify it in `etc/config.yml`. I think it would be better if we provide the default values...

Yes this will work fine. Also if the env var defined should override the config values from yaml. Docker compose ask for env file and also secrets and other env...

> ```go > MediaImageMaxSize int64 `json:",default=5242880,env=MEDIA_IMAGE_SIZE"` > ``` > > Use it like this? @kevwan I think this is the best way. For priority order I please have a look...

hey @kevwan, I found github.com/num30/config package This has exact functionality I need, loading values from flags, config files, and env vars (all file formats supported by viper) Also it has...

```go type Config struct { // we need `mapstructure:",squash"` here to refer to the inside properties of the struct without refering to the struct itself rest.RestConf `mapstructure:",squash"` Redis cache.CacheConf Postgres...

I logged the conf file. Here is the formatted version ```json { "Name":"", "Log":{ "ServiceName":"", "Mode":"", "Encoding":"", "TimeFormat":"", "Path":"", "Level":"", "Compress":false, "KeepDays":0, "StackCooldownMillis":0, "MaxBackups":0, "MaxSize":0, "Rotation":"" }, "Mode":"", "MetricsUrl":"", "Prometheus":{...

Redis only works if specified from yml like this ``` Redis: Host: redis:6379 ``` or ``` Redis: - Host: redis:6379 ``` someone take a look at this prob