From 4dbfd5f7297fdd7a237c3c563fdda79d77f299bb Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 18 Dec 2023 20:20:20 +0100 Subject: fking good --- c_parse.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'c_parse.go') 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 } -- cgit v1.2.3