mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 21:12:07 +00:00
drop redundant NArg check when looping Args
This commit is contained in:
parent
02f4d643ea
commit
82c40e3697
@ -29,8 +29,6 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
maxTextSize := flag.Int("max-text-size", 1, "maximum size of attribute or text (in MB)")
|
maxTextSize := flag.Int("max-text-size", 1, "maximum size of attribute or text (in MB)")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if flag.NArg() > 0 {
|
|
||||||
for _, path := range flag.Args() {
|
for _, path := range flag.Args() {
|
||||||
fmt.Printf("processing junit xml file : %s\n", path)
|
fmt.Printf("processing junit xml file : %s\n", path)
|
||||||
xmlReader, err := os.Open(path)
|
xmlReader, err := os.Open(path)
|
||||||
@ -57,7 +55,6 @@ func main() {
|
|||||||
fmt.Println("done.")
|
fmt.Println("done.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
func pruneXML(suites *junitxml.JUnitTestSuites, maxBytes int) {
|
func pruneXML(suites *junitxml.JUnitTestSuites, maxBytes int) {
|
||||||
for _, suite := range suites.Suites {
|
for _, suite := range suites.Suites {
|
||||||
|
Loading…
Reference in New Issue
Block a user