diff options
author | Joe <rbo@gmx.us> | 2023-12-18 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-18 20:20:20 +0100 |
commit | ff46232876da57297d6f8b46e311fcd0f659b5cf (patch) | |
tree | 300b49d4c3ba84d1a7ac8e0a06ba68563c03395d /c_parse.go | |
parent | added LICENSE (diff) | |
download | hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.tar.gz hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.tar.bz2 hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.tar.xz hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.tar.zst hardflip-ff46232876da57297d6f8b46e311fcd0f659b5cf.zip |
up
Diffstat (limited to '')
-rw-r--r-- | c_parse.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -68,5 +68,19 @@ func c_read_yaml_file(file string) *HostNode { if len(host.Host) == 0 { return nil } + if host.Type == 0 { + if host.Port == 0 { + host.Port = 22 + } + if len(host.User) == 0 { + host.User = "root" + } + } else if host.Type == 1 { + if host.Port == 0 { + host.Port = 3389 + } + } else if host.Type > 1 { + host_type = "Unknown" + } return &host } |