aboutsummaryrefslogtreecommitdiffstats
path: root/c_parse.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-18 20:20:20 +0100
committerJoe <rbo@gmx.us>2023-12-18 20:20:20 +0100
commit4dbfd5f7297fdd7a237c3c563fdda79d77f299bb (patch)
treeb6385f5e88b9ddc8fb2e3080a50f631c9c7ed22b /c_parse.go
parentcool (diff)
downloadhardflip-4dbfd5f7297fdd7a237c3c563fdda79d77f299bb.tar.gz
hardflip-4dbfd5f7297fdd7a237c3c563fdda79d77f299bb.tar.bz2
hardflip-4dbfd5f7297fdd7a237c3c563fdda79d77f299bb.tar.xz
hardflip-4dbfd5f7297fdd7a237c3c563fdda79d77f299bb.tar.zst
hardflip-4dbfd5f7297fdd7a237c3c563fdda79d77f299bb.zip
fking good
Diffstat (limited to 'c_parse.go')
-rw-r--r--c_parse.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/c_parse.go b/c_parse.go
index 54d25f9..358b2d3 100644
--- a/c_parse.go
+++ b/c_parse.go
@@ -62,11 +62,11 @@ func c_read_yaml_file(file string) *HostNode {
if err = yaml.Unmarshal(yaml_file, &host); err != nil {
c_die("error reading yaml file " + file, err)
}
- if len(host.User) == 0 {
- host.User = "root"
+ if len(host.Name) == 0 {
+ return nil
}
- if host.Port == 0 {
- host.Port = 22
+ if len(host.Host) == 0 {
+ return nil
}
return &host
}