From b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 14 Dec 2023 20:20:20 +0100 Subject: print --- c_init.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'c_init.go') diff --git a/c_init.go b/c_init.go index 057d741..d66a2f7 100644 --- a/c_init.go +++ b/c_init.go @@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * josh: src/c_init.go - * Thu, 14 Dec 2023 16:55:35 +0100 + * Thu, 14 Dec 2023 19:21:22 +0100 * Joe * * init functions @@ -92,8 +92,13 @@ func c_read_yaml_file(file string) { 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 host.Port == 0 { + host.Port = 22 + } fmt.Println(host) - os.Exit(0) } // This function recurses into the specified root directory in order to load -- cgit v1.2.3