MCPcopy Create free account
hub / github.com/juju/errors / stringOrStringer

Function stringOrStringer

checkers_test.go:90–98  ·  view source on GitHub ↗

stringOrStringer is copied from juju/testing

(value interface{})

Source from the content-addressed store, hash-verified

88
89// stringOrStringer is copied from juju/testing
90func stringOrStringer(value interface{}) (string, bool) {
91 result, isString := value.(string)
92 if !isString {
93 if stringer, isStringer := value.(fmt.Stringer); isStringer {
94 result, isString = stringer.String(), true
95 }
96 }
97 return result, isString
98}

Callers 1

CheckMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…