diff options
author | Joe <rbo@gmx.us> | 2024-01-31 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-31 20:20:20 +0100 |
commit | d6162141a3d34e594816d657ed36c1b7ddb48eeb (patch) | |
tree | 94cf3ceacf6f03cc6289c3c3ba994264a588a3c6 /src/c_parse.go | |
parent | way better roadmap (diff) | |
download | hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.tar.gz hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.tar.bz2 hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.tar.xz hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.tar.zst hardflip-d6162141a3d34e594816d657ed36c1b7ddb48eeb.zip |
good start
Diffstat (limited to 'src/c_parse.go')
-rw-r--r-- | src/c_parse.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/c_parse.go b/src/c_parse.go index faa8223..3a58558 100644 --- a/src/c_parse.go +++ b/src/c_parse.go @@ -58,7 +58,8 @@ import ( "gopkg.in/yaml.v3" ) -func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) { +func c_read_yaml_file(file string, + opts HardOpts, ui *HardUI) (*HostNode, error) { var host HostNode yaml_file, err := os.ReadFile(file) @@ -68,6 +69,9 @@ func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) { if err := yaml.Unmarshal(yaml_file, &host); err != nil { return nil, err } + if len(opts.GPG) == 0 { + host.Pass = "" + } if len(host.Name) == 0 { return nil, nil } |