MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / parseSSHConfigTree

Function parseSSHConfigTree

agent/app/service/ssh.go:843–859  ·  view source on GitHub ↗
(root string)

Source from the content-addressed store, hash-verified

841}
842
843func parseSSHConfigTree(root string) ([]sshDirective, []sshConfigFile, error) {
844 rootPath, err := filepath.Abs(root)
845 if err != nil {
846 return nil, nil, err
847 }
848 var (
849 directives []sshDirective
850 fileList []sshConfigFile
851 order int
852 priority int
853 )
854 visited := make(map[string]bool)
855 if err := parseSSHConfigFile(rootPath, false, visited, &directives, &fileList, &order, &priority); err != nil {
856 return nil, nil, err
857 }
858 return directives, fileList, nil
859}
860
861func parseSSHConfigFile(
862 fileName string,

Callers 4

UpdateMethod · 0.85
loadSSHConfigInfoFunction · 0.85
LoadSSHFileMethod · 0.85
isSSHConfigPathAllowedFunction · 0.85

Calls 1

parseSSHConfigFileFunction · 0.85

Tested by

no test coverage detected