feature: pre_lvm_crypt

This commit is contained in:
Mikaël Cluseau
2023-12-17 13:48:18 +01:00
parent 898c43b954
commit 12bfa6cfd6
9 changed files with 100 additions and 14 deletions

34
tools/testconf/main.go Normal file
View File

@ -0,0 +1,34 @@
package main
import (
"bytes"
"flag"
"log"
"os"
"gopkg.in/yaml.v3"
config "novit.tech/direktil/pkg/bootstrapconfig"
)
func main() {
flag.Parse()
for _, arg := range flag.Args() {
log.Print("testing ", arg)
cfgBytes, err := os.ReadFile(arg)
if err != nil {
log.Fatal(err)
}
cfg := config.Config{}
dec := yaml.NewDecoder(bytes.NewBuffer(cfgBytes))
dec.KnownFields(true)
err = dec.Decode(&cfg)
if err != nil {
log.Fatal(err)
}
}
}