Rename UID and GID to PUID and PGID
This commit is contained in:
@@ -4,14 +4,20 @@ import (
|
||||
libparams "github.com/qdm12/golibs/params"
|
||||
)
|
||||
|
||||
// GetUID obtains the user ID to use from the environment variable UID.
|
||||
func (r *reader) GetUID() (uid int, err error) {
|
||||
return r.envParams.GetEnvIntRange("UID", 0, 65535, libparams.Default("1000"))
|
||||
// GetPUID obtains the user ID to use from the environment variable PUID
|
||||
// with retro compatible variable UID.
|
||||
func (r *reader) GetPUID() (ppuid int, err error) {
|
||||
return r.envParams.GetEnvIntRange("PUID", 0, 65535,
|
||||
libparams.Default("1000"),
|
||||
libparams.RetroKeys([]string{"UID"}, r.onRetroActive))
|
||||
}
|
||||
|
||||
// GetGID obtains the group ID to use from the environment variable GID.
|
||||
func (r *reader) GetGID() (gid int, err error) {
|
||||
return r.envParams.GetEnvIntRange("GID", 0, 65535, libparams.Default("1000"))
|
||||
// GetGID obtains the group ID to use from the environment variable PGID
|
||||
// with retro compatible variable PGID.
|
||||
func (r *reader) GetPGID() (pgid int, err error) {
|
||||
return r.envParams.GetEnvIntRange("PGID", 0, 65535,
|
||||
libparams.Default("1000"),
|
||||
libparams.RetroKeys([]string{"GID"}, r.onRetroActive))
|
||||
}
|
||||
|
||||
// GetTZ obtains the timezone from the environment variable TZ.
|
||||
|
||||
Reference in New Issue
Block a user