MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / logStack

Function logStack

types/util.go:49–57  ·  view source on GitHub ↗

logStack prints the formatted "start" message to stderr and returns a closure that prints the corresponding "end" message. Call using 'defer logStack(...)()' to show builder stack on panic. Don't forget trailing parens!

(format string, args ...interface{})

Source from the content-addressed store, hash-verified

47// Don't forget trailing parens!
48//
49func logStack(format string, args ...interface{}) func() {
50 msg := fmt.Sprintf(format, args...)
51 io.WriteString(os.Stderr, msg)
52 io.WriteString(os.Stderr, "\n")
53 return func() {
54 io.WriteString(os.Stderr, msg)
55 io.WriteString(os.Stderr, " end\n")
56 }
57}
58
59// newVar creates a 'var' for use in a types.Tuple.
60func newVar(name string, typ Type) *Var {

Callers 5

makeWrapperKeyMethod · 0.85
makeBoundMethod · 0.85
MethodValueMethod · 0.85
buildFunctionMethod · 0.85
buildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected