* Vendors packages * Adds a Makefile that uses docker to build a static binary against musl using alpine linux. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
15 lines
270 B
Go
15 lines
270 B
Go
//go:build !windows
|
|
|
|
package shared
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func GetOwnerMode(fInfo os.FileInfo) (os.FileMode, int, int) {
|
|
mode := fInfo.Mode()
|
|
uid := int(fInfo.Sys().(*syscall.Stat_t).Uid)
|
|
gid := int(fInfo.Sys().(*syscall.Stat_t).Gid)
|
|
return mode, uid, gid
|
|
}
|