package store import "github.com/pkg/errors" type Name string var ErrEmptyName = errors.New("name cannot be empty") func ValidateName(name string) (Name, error) { if name == "" { return "", errors.WithStack(ErrEmptyName) } return Name(name), nil }