diff options
author | Joe <rbo@gmx.us> | 2024-02-01 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-02-01 20:20:20 +0100 |
commit | 2601e660db5ffb7a57e2496c24f9bbb52a0158f3 (patch) | |
tree | 1b5144ee08df2f2066c039e43c4bafe8786421d9 /src/c_parse.go | |
parent | useless changes (diff) | |
download | hardflip-2601e660db5ffb7a57e2496c24f9bbb52a0158f3.tar.gz hardflip-2601e660db5ffb7a57e2496c24f9bbb52a0158f3.tar.bz2 hardflip-2601e660db5ffb7a57e2496c24f9bbb52a0158f3.tar.xz hardflip-2601e660db5ffb7a57e2496c24f9bbb52a0158f3.tar.zst hardflip-2601e660db5ffb7a57e2496c24f9bbb52a0158f3.zip |
conf
Diffstat (limited to 'src/c_parse.go')
-rw-r--r-- | src/c_parse.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/c_parse.go b/src/c_parse.go index 53249cf..a032381 100644 --- a/src/c_parse.go +++ b/src/c_parse.go @@ -52,8 +52,9 @@ package main import ( - "os" "errors" + "fmt" + "os" "gopkg.in/yaml.v3" ) @@ -65,7 +66,7 @@ func c_parse_opts(file string) (HardOpts, error) { if err != nil { return opts, err } - err = yaml.Unmarshal(yaml_file, opts) + err = yaml.Unmarshal(yaml_file, &opts) return opts, err } @@ -77,6 +78,7 @@ func c_read_yaml_file(file string, ui *HardUI) (*HostNode, error) { return nil, err } if err := yaml.Unmarshal(yaml_file, &host); err != nil { + err = errors.New(fmt.Sprintf("%s: %v", file, err)) return nil, err } if len(host.Name) == 0 { |