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

Function toInt

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

Source from the content-addressed store, hash-verified

150}
151
152func toInt(arg interface{}) (int, error) {
153 intVal, ok := arg.(int)
154 if !ok {
155 return 0, fmt.Errorf("expects int value, but got %#v", arg)
156 }
157 return intVal, nil
158}
159
160func toString(arg interface{}) (string, error) {
161 strVal, ok := arg.(string)

Callers 1

setIntArgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected