MCPcopy
hub / github.com/google/mtail / String

Method String

internal/runtime/compiler/types/types.go:44–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44func (e *TypeError) String() string {
45 if e == nil || e.error == nil {
46 return "type error"
47 }
48 var estr, rstr string
49 if IsComplete(e.expected) {
50 estr = e.expected.String()
51 } else {
52 estr = "incomplete type"
53 }
54 if IsComplete(e.received) {
55 rstr = e.received.String()
56 } else {
57 rstr = "incomplete type"
58 }
59 glog.V(2).Infof("%s: expected %q received %q", e.error, e.expected, e.received)
60 return fmt.Sprintf("%s; expected %s received %s", e.error, estr, rstr)
61}
62
63func (e TypeError) Error() string {
64 return e.String()

Callers 1

ErrorMethod · 0.95

Calls 2

IsCompleteFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected