mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 14:53:44 +00:00
drop redundant NArg check when looping Args
This commit is contained in:
parent
02f4d643ea
commit
e0ebac6c9c
@ -28,8 +28,6 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
indent := flag.Int("indent", 2, "default indent")
|
indent := flag.Int("indent", 2, "default indent")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if flag.NArg() > 0 {
|
|
||||||
for _, path := range flag.Args() {
|
for _, path := range flag.Args() {
|
||||||
sourceYaml, err := os.ReadFile(path)
|
sourceYaml, err := os.ReadFile(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -52,7 +50,6 @@ func main() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func fetchYaml(sourceYaml []byte) (*yaml.Node, error) {
|
func fetchYaml(sourceYaml []byte) (*yaml.Node, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user