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 | 4dbfd5f7297fdd7a237c3c563fdda79d77f299bb (patch) | |
tree | b6385f5e88b9ddc8fb2e3080a50f631c9c7ed22b /c_parse.go | |
parent | cool (diff) | |
download | hardflip-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.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 } |