MCPcopy Create free account
hub / github.com/passteque/gluetun / SetDefaults

Method SetDefaults

internal/httpserver/settings.go:36–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36func (s *Settings) SetDefaults() {
37 s.Address = gosettings.DefaultComparable(s.Address, ":8000")
38 const defaultReadTimeout = 3 * time.Second
39 s.ReadHeaderTimeout = gosettings.DefaultComparable(s.ReadHeaderTimeout, defaultReadTimeout)
40 s.ReadTimeout = gosettings.DefaultComparable(s.ReadTimeout, defaultReadTimeout)
41 const defaultShutdownTimeout = 3 * time.Second
42 s.ShutdownTimeout = gosettings.DefaultComparable(s.ShutdownTimeout, defaultShutdownTimeout)
43}
44
45func (s Settings) Copy() Settings {
46 return Settings{

Callers 2

NewFunction · 0.45

Calls

no outgoing calls

Tested by 1