♻️ Default cmdtestgen output to command-test.sh
This commit is contained in:
1 parent
ee7b633c98
commit
4cb0fa4f76
1 file changed
+1
-6
@@ -161,16 +161,11 @@ func generate() string {
|
||||
}
|
||||
|
||||
func main() {
|
||||
out := flag.String("out", "", "output file (default: stdout)")
|
||||
out := flag.String("out", "./scripts/command-test.sh", "output file")
|
||||
flag.Parse()
|
||||
|
||||
content := generate()
|
||||
|
||||
if *out == "" {
|
||||
fmt.Print(content)
|
||||
return
|
||||
}
|
||||
|
||||
if err := os.WriteFile(*out, []byte(content), 0o755); err != nil {
|
||||
log.Fatalf("write %s: %v", *out, err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user