aboutsummaryrefslogtreecommitdiffstats
path: root/c_parse.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c_parse.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/c_parse.go b/c_parse.go
index 358b2d3..43a270c 100644
--- a/c_parse.go
+++ b/c_parse.go
@@ -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
}