MCPcopy Index your code
hub / github.com/git-bug/git-bug / Validate

Method Validate

entities/common/label.go:53–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53func (l Label) Validate() error {
54 str := string(l)
55
56 if text.Empty(str) {
57 return fmt.Errorf("empty")
58 }
59
60 if !text.SafeOneLine(str) {
61 return fmt.Errorf("label has unsafe characters")
62 }
63
64 return nil
65}
66
67type LabelColor color.RGBA
68

Callers

nothing calls this directly

Calls 3

EmptyFunction · 0.92
SafeOneLineFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected