feat: initial commit
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
This commit is contained in:
14
internal/store/name.go
Normal file
14
internal/store/name.go
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user