indent: rip out old go 1.9 support

This commit is contained in:
Scott Blum 2023-11-22 08:54:31 -05:00
parent 6093b09afa
commit 7ccaf0a21f
3 changed files with 1 additions and 21 deletions

View File

@ -1,10 +0,0 @@
//go:build go1.10
// +build go1.10
package main
func indent() string {
// In Go 1.10 and up, the flag package automatically
// adds the right indentation.
return ""
}

View File

@ -1,10 +0,0 @@
//go:build !go1.10
// +build !go1.10
package main
func indent() string {
// In Go 1.9 and older, we need to add indentation
// after newlines in the flag doc strings.
return " \t"
}

View File

@ -825,7 +825,7 @@ func prettify(docString string) string {
j++
}
return strings.Join(parts[:j], "\n"+indent())
return strings.Join(parts[:j], "\n")
}
func warn(msg string, args ...interface{}) {