Rename UID and GID to PUID and PGID

This commit is contained in:
Quentin McGaw
2020-12-29 16:44:35 +00:00
parent 8d5f2fec09
commit cb64302294
14 changed files with 68 additions and 59 deletions

View File

@@ -3,7 +3,7 @@ package publicip
import "github.com/qdm12/gluetun/internal/os"
func persistPublicIP(openFile os.OpenFileFunc,
filepath string, content string, uid, gid int) error {
filepath string, content string, puid, pgid int) error {
file, err := openFile(
filepath,
os.O_TRUNC|os.O_WRONLY|os.O_CREATE,
@@ -18,7 +18,7 @@ func persistPublicIP(openFile os.OpenFileFunc,
return err
}
if err := file.Chown(uid, gid); err != nil {
if err := file.Chown(puid, pgid); err != nil {
_ = file.Close()
return err
}