aboutsummaryrefslogtreecommitdiffstats
path: root/c_init.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-14 20:20:20 +0100
committerJoe <rbo@gmx.us>2023-12-14 20:20:20 +0100
commitb9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25 (patch)
treee00248d5f0339fab6463143ced7c66489c71b0f7 /c_init.go
parentup (diff)
downloadhardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.tar.gz
hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.tar.bz2
hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.tar.xz
hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.tar.zst
hardflip-b9f95a4aa8160fc48de6bf8bbd9cebb927bd3d25.zip
print
Diffstat (limited to '')
-rw-r--r--c_init.go9
1 files changed, 7 insertions, 2 deletions
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