drop redundant NArg check when looping Args

This commit is contained in:
Benjamin Elder 2023-05-16 23:23:22 -07:00
parent 02f4d643ea
commit e0ebac6c9c

View File

@ -28,8 +28,6 @@ import (
func main() {
indent := flag.Int("indent", 2, "default indent")
flag.Parse()
if flag.NArg() > 0 {
for _, path := range flag.Args() {
sourceYaml, err := os.ReadFile(path)
if err != nil {
@ -52,7 +50,6 @@ func main() {
continue
}
}
}
}
func fetchYaml(sourceYaml []byte) (*yaml.Node, error) {