shithub: mycel

ref: ba613e27cf2a4a29fc5a8955f3f782d1881205f8
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
}