sshConfigGetCoderSection is a helper function that only returns the coder section of the SSH config and a boolean if it exists.
(data []byte)
| 718 | // sshConfigGetCoderSection is a helper function that only returns the coder |
| 719 | // section of the SSH config and a boolean if it exists. |
| 720 | func 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 |
no test coverage detected