From fbe50ac4c3ed53f55bfdafaf793eab5efc30d5d3 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 26 Dec 2023 20:20:20 +0100 Subject: fine for now --- c_parse.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'c_parse.go') diff --git a/c_parse.go b/c_parse.go index d2f1580..407809b 100644 --- a/c_parse.go +++ b/c_parse.go @@ -49,6 +49,7 @@ package main import ( "os" + "gopkg.in/yaml.v3" ) @@ -68,7 +69,7 @@ func c_read_yaml_file(file string) *HostNode { if len(host.Host) == 0 { return nil } - if host.Type == 0 { + if host.Protocol == 0 { if host.Port == 0 { host.Port = 22 } @@ -83,7 +84,7 @@ func c_read_yaml_file(file string) *HostNode { host.JumpUser = "root" } } - } else if host.Type == 1 { + } else if host.Protocol == 1 { if len(host.User) == 0 { host.User = "Administrator" } @@ -96,7 +97,7 @@ func c_read_yaml_file(file string) *HostNode { if host.Height == 0 { host.Height = 1200 } - } else if host.Type > 1 { + } else if host.Protocol > 1 { return nil } if host.Quality > 2 { -- cgit v1.2.3