MCPcopy Index your code
hub / github.com/coder/coder / isSingleHostPatternToken

Function isSingleHostPatternToken

codersdk/deployment.go:728–732  ·  view source on GitHub ↗

isSingleHostPatternToken reports whether s is safe to write as a single SSH host pattern token. Whitespace or control characters could break out into additional SSH config directives.

(s string)

Source from the content-addressed store, hash-verified

726// host pattern token. Whitespace or control characters could break out into
727// additional SSH config directives.
728func isSingleHostPatternToken(s string) bool {
729 return !strings.ContainsFunc(s, func(r rune) bool {
730 return unicode.IsSpace(r) || unicode.IsControl(r)
731 })
732}
733
734// ValidateWorkspaceHostnameSuffix validates a deployment-provided SSH hostname
735// suffix before it is made available to clients.

Calls

no outgoing calls

Tested by

no test coverage detected