MCPcopy Create free account
hub / github.com/conventionalcommit/commitlint / toString

Function toString

lint/rule/rule.go:160–166  ·  view source on GitHub ↗
(arg interface{})

Source from the content-addressed store, hash-verified

158}
159
160func toString(arg interface{}) (string, error) {
161 strVal, ok := arg.(string)
162 if !ok {
163 return "", fmt.Errorf("expects string value, but got %#v", arg)
164 }
165 return strVal, nil
166}
167
168func toStringArr(arg interface{}) ([]string, error) {
169 switch argVal := arg.(type) {

Callers 1

setStringArgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected