TZ setting shown at start (#119)
This commit is contained in:
20
internal/params/system.go
Normal file
20
internal/params/system.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package params
|
||||
|
||||
import (
|
||||
libparams "github.com/qdm12/golibs/params"
|
||||
)
|
||||
|
||||
// GetUID obtains the user ID to use from the environment variable UID
|
||||
func (p *paramsReader) GetUID() (uid int, err error) {
|
||||
return p.envParams.GetEnvIntRange("UID", 0, 65535, libparams.Default("1000"))
|
||||
}
|
||||
|
||||
// GetGID obtains the group ID to use from the environment variable GID
|
||||
func (p *paramsReader) GetGID() (gid int, err error) {
|
||||
return p.envParams.GetEnvIntRange("GID", 0, 65535, libparams.Default("1000"))
|
||||
}
|
||||
|
||||
// GetTZ obtains the timezone from the environment variable TZ
|
||||
func (p *paramsReader) GetTimezone() (timezone string, err error) {
|
||||
return p.envParams.GetEnv("TZ")
|
||||
}
|
||||
Reference in New Issue
Block a user