mirror of
https://github.com/fullstorydev/grpcurl.git
synced 2026-05-22 19:51:44 +03:00
indent: rip out old go 1.9 support
This commit is contained in:
@@ -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{}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user