MCPcopy
hub / github.com/1Panel-dev/KubePi / isValidShell

Function isValidShell

pkg/terminal/shell.go:276–283  ·  view source on GitHub ↗

isValidShell checks if the shell is an allowed one

(validShells []string, shell string)

Source from the content-addressed store, hash-verified

274
275// isValidShell checks if the shell is an allowed one
276func isValidShell(validShells []string, shell string) bool {
277 for _, validShell := range validShells {
278 if validShell == shell {
279 return true
280 }
281 }
282 return false
283}
284
285// WaitForTerminal is called from apihandler.handleAttach as a goroutine
286// Waits for the SockJS connection to be opened by the client the session to be Bound in handleTerminalSession

Callers 1

WaitForTerminalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected