MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / UserMessage

Function UserMessage

message/message.go:16–23  ·  view source on GitHub ↗

region Factories UserMessage constructs a Message. - Code is an error code allowing an administrator to identify the error that happened. - UserMessage is the message that can be printed to the user if needed. - Explanation is the explanation string to the system administrator. This is an fmt.Sprin

(Code string, UserMessage string, Explanation string, Args ...interface{})

Source from the content-addressed store, hash-verified

14// - Args are the arguments to Explanation to create a formatted message. It is recommended that these arguments also
15// be added as labels to allow system administrators to index the error properly.
16func UserMessage(Code string, UserMessage string, Explanation string, Args ...interface{}) Message {
17 return &message{
18 code: Code,
19 userMessage: UserMessage,
20 explanation: fmt.Sprintf(Explanation, Args...),
21 labels: map[LabelName]LabelValue{},
22 }
23}
24
25// WrapUser creates a Message wrapping an error with a user-facing message.
26//

Callers 15

testLevelFunction · 0.92
OnEnvRequestMethod · 0.92
OnPtyRequestMethod · 0.92
OnExecRequestMethod · 0.92
OnShellMethod · 0.92
OnSubsystemMethod · 0.92
OnSignalMethod · 0.92
OnX11RequestMethod · 0.92
OnRequestStreamLocalMethod · 0.92
KeyboardInteractiveMethod · 0.92
GetAuthorizationURLMethod · 0.92

Calls

no outgoing calls

Tested by 1

testLevelFunction · 0.74