func ParseUserinfo(userinfoRaw string) (*Userinfo, error) {
	i := strings.IndexByte(userinfoRaw, ':')
	r := &Userinfo{}
	if i < 0 {
		r.User = userinfoRaw
	} else {
		r.User = userinfoRaw[:i]
	}
	if r.User == "" {
		r.UID = new(int64)
		*r.UID = 0
	} else {
		r.UID = util.TryParseInt64(r.User)
		if r.UID != nil && (*r.UID > math.MaxInt32 || *r.UID < 0) {
			return nil, fmt.Errorf("linux spec user: uids and gids must be in range 0-2147483647")
		}
	}
	err := r.parseUserinfoGroup(userinfoRaw, i)
	if err != nil {
		return nil, err
	}
	return r, nil
}
ParseUserinfo parses a string into a user and group. The string is interpreted exactly as the docker run command would interpret it.
package docker
import (
	"fmt"
	"math"
	"strings"
	"github.com/kube-compose/kube-compose/internal/pkg/util"
)
type Userinfo struct {
	UID   *int64
	User  string
	GID   *int64
	Group string
}