package configs import "github.com/spf13/viper" type HttpConfig struct { MaxIdleConnectionPool int MaxConnection int MaxTimeoutInSeconds int64 } func NewHttpConfig() *HttpConfig { return &HttpConfig{ MaxIdleConnectionPool: viper.GetInt("http.max.idle.connection.pool"), MaxConnection: viper.GetInt("http.max.connection"), MaxTimeoutInSeconds: viper.GetInt64("http.max.idle.timeout.seconds"), } }