INNER CODE UNIT · Go
func
resgateio/resgate · main.go:105
func (c *Config) SetDefault() {
if c.NatsURL == "" {
c.NatsURL = DefaultNatsURL
}
if c.RequestTimeout == 0 {
c.RequestTimeout = DefaultRequestTimeout
}
if c.NatsRootCAs == nil {
c.NatsRootCAs = []string{}
}
if c.BufferSize == 0 {
c.BufferSize = 8192
}
c.Config.SetDefault()
}
// Init takes a path to a json encoded file and loads the config
// If no file exists, a new file with default settings is created