MCPcopy Create free account
hub / github.com/HashLoad/boss / Msg

Method Msg

msg/msg.go:117–133  ·  view source on GitHub ↗
(msg string, args ...interface{})

Source from the content-addressed store, hash-verified

115}
116
117func (m *Messenger) Msg(msg string, args ...interface{}) {
118 m.Lock()
119 defer m.Unlock()
120 if !strings.HasSuffix(msg, "\n") {
121 msg += "\n"
122 }
123
124 if len(args) == 0 {
125 if _, err := fmt.Fprint(m.Stderr, msg); err != nil {
126 println("[Fault] %s", err.Error())
127 }
128 } else {
129 if _, err := fmt.Fprintf(m.Stderr, msg, args...); err != nil {
130 println("[Fault] %s", err.Error())
131 }
132 }
133}
134
135func (m *Messenger) Puts(msg string, args ...interface{}) {
136 m.Lock()

Callers 5

ErrMethod · 0.95
WarnMethod · 0.95
InfoMethod · 0.95
DebugMethod · 0.95
MsgFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected