import (
"flag"
"fmt"
- "io/ioutil"
"log"
"os"
)
func usage() {
- fmt.Fprint(os.Stderr, nncp.UsageHeader())
fmt.Fprint(os.Stderr, "nncp-cfgdir -- Convert configuration file to the directory layout.\n\n")
fmt.Fprintf(os.Stderr, "Usage: %s [options] [-cfg ...] -dump /path/to/dir\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] -load /path/to/dir > cfg.hjson\nOptions:\n", os.Args[0])
}
if *doDump {
- cfgRaw, err := ioutil.ReadFile(*cfgPath)
+ cfgRaw, err := os.ReadFile(*cfgPath)
if err != nil {
log.Fatalln(err)
}