diff options
author | Joe <rbo@gmx.us> | 2024-03-29 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-03-29 20:20:20 +0100 |
commit | 486f840694b55452ea212fbf95ebd0cafddb33a8 (patch) | |
tree | d6e3238188d1dc6e0cab6b23ab3f245975c2cd7c /src/c_parse.go | |
parent | here (diff) | |
download | hardflip-486f840694b55452ea212fbf95ebd0cafddb33a8.tar.gz hardflip-486f840694b55452ea212fbf95ebd0cafddb33a8.tar.bz2 hardflip-486f840694b55452ea212fbf95ebd0cafddb33a8.tar.xz hardflip-486f840694b55452ea212fbf95ebd0cafddb33a8.tar.zst hardflip-486f840694b55452ea212fbf95ebd0cafddb33a8.zip |
iota
Diffstat (limited to 'src/c_parse.go')
-rw-r--r-- | src/c_parse.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/c_parse.go b/src/c_parse.go index 5375874..ce7803e 100644 --- a/src/c_parse.go +++ b/src/c_parse.go @@ -70,7 +70,7 @@ func c_parse_opts(file string) (HardOpts, error) { return opts, err } -func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) { +func c_read_yaml_file(file string) (*HostNode, error) { var host HostNode yaml_file, err := os.ReadFile(file) @@ -92,7 +92,7 @@ func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) { return nil, nil } } - if host.Protocol == 0 { + if host.Protocol == PROTOCOL_SSH { if host.Port == 0 { host.Port = 22 } @@ -107,7 +107,7 @@ func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) { host.Jump.User = "root" } } - } else if host.Protocol == 1 { + } else if host.Protocol == PROTOCOL_RDP { if len(host.User) == 0 { host.User = "Administrator" } @@ -120,7 +120,7 @@ func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) { if host.Height == 0 { host.Height = 1200 } - } else if host.Protocol == 2 { + } else if host.Protocol == PROTOCOL_CMD { if len(host.Shell) == 0 { host.Shell = []string{"/bin/sh", "-c"} } |