Start of code growth

This commit is contained in:
Ian Gulliver
2021-11-20 18:51:19 -10:00
parent 5af90aa6ff
commit 510680d6c5
3 changed files with 63 additions and 0 deletions

26
grow/main.go Normal file
View File

@@ -0,0 +1,26 @@
package main
import "flag"
import "log"
import "os"
func main() {
defPath := flag.String("def-path", "", "path to definition YAML file")
flag.Parse()
if *defPath == "" {
log.Fatal("Please specify --def-path")
}
defFile, err := os.Open(*defPath)
if err != nil {
log.Fatal(err)
}
def, err := loadDefinition(defFile)
if err != nil {
log.Fatal(err)
}
log.Printf("%+v", def)
}