bouncer/internal/store/name.go
William Petit e66938f1d3
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
feat: initial commit
2023-05-21 22:27:25 +02:00

15 lines
257 B
Go

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
}