shithub: mycel

ref: 09b964472704c60ee0aa9a34d00e82316b94f952
dir: /mycel_unix.go/

View raw version
//go:build !plan9

package mycel

import (
	"fmt"
	"os/user"
)

const PathPrefix = "mycel"

func Group(u *user.User) (string, error) {
	g, err := user.LookupGroupId(u.Gid)
	if err != nil {
		return "", fmt.Errorf("get group: %w", err)
	}
	return g.Name, nil
}