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

Function sshConfigGetCoderSection

cli/configssh.go:720–727  ·  view source on GitHub ↗

sshConfigGetCoderSection is a helper function that only returns the coder section of the SSH config and a boolean if it exists.

(data []byte)

Source from the content-addressed store, hash-verified

718// sshConfigGetCoderSection is a helper function that only returns the coder
719// section of the SSH config and a boolean if it exists.
720func sshConfigGetCoderSection(data []byte) (section []byte, ok bool, err error) {
721 _, section, _, err = sshConfigSplitOnCoderSection(data)
722 if err != nil {
723 return nil, false, err
724 }
725
726 return section, len(section) > 0, nil
727}
728
729// sshConfigSplitOnCoderSection splits the SSH config into 3 sections.
730// All lines before sshStartToken, the coder section, and all lines after

Callers 1

configSSHMethod · 0.85

Calls 1

Tested by

no test coverage detected