MCPcopy Create free account
hub / github.com/belak/gitdir / cmdWhoami

Function cmdWhoami

ssh_commands.go:13–18  ·  view source on GitHub ↗
(ctx context.Context, s ssh.Session, cmd []string)

Source from the content-addressed store, hash-verified

11)
12
13func cmdWhoami(ctx context.Context, s ssh.Session, cmd []string) int { //nolint:interfacer
14 user := CtxUser(ctx)
15 _ = writeStringFmt(s, "logged in as %s\r\n", user.Username)
16
17 return 0
18}
19
20func cmdNotFound(ctx context.Context, s ssh.Session, cmd []string) int {
21 _ = writeStringFmt(s.Stderr(), "command %q not found\r\n", cmd[0])

Callers 1

handleSessionMethod · 0.85

Calls 2

CtxUserFunction · 0.85
writeStringFmtFunction · 0.85

Tested by

no test coverage detected