indent: rip out old go 1.9 support
This commit is contained in:
parent
6093b09afa
commit
7ccaf0a21f
|
|
@ -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 ""
|
|
||||||
}
|
|
||||||
|
|
@ -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"
|
|
||||||
}
|
|
||||||
|
|
@ -825,7 +825,7 @@ func prettify(docString string) string {
|
||||||
j++
|
j++
|
||||||
}
|
}
|
||||||
|
|
||||||
return strings.Join(parts[:j], "\n"+indent())
|
return strings.Join(parts[:j], "\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
func warn(msg string, args ...interface{}) {
|
func warn(msg string, args ...interface{}) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue