mirror of
https://github.com/spf13/cobra
synced 2025-05-05 12:57:22 +00:00
gofmt
This commit is contained in:
parent
7fbe0bde7b
commit
45bfd072b4
2 changed files with 4 additions and 4 deletions
|
@ -19,10 +19,10 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
"regexp"
|
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,7 @@ var cmdDirs = []string{"cmd", "cmds", "command", "commands"}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
funcMap = template.FuncMap{
|
funcMap = template.FuncMap{
|
||||||
"comment": commentifyString,
|
"comment": commentifyString,
|
||||||
"camelcase": camelCaseString,
|
"camelcase": camelCaseString,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,8 +146,8 @@ func TestInitHelpFlagMergesFlags(t *testing.T) {
|
||||||
cmd.initHelpFlag()
|
cmd.initHelpFlag()
|
||||||
actual := cmd.Flags().Lookup("help").Usage
|
actual := cmd.Flags().Lookup("help").Usage
|
||||||
if actual != usage {
|
if actual != usage {
|
||||||
t.Fatalf("Expected the help flag from the base command with usage '%s', " +
|
t.Fatalf("Expected the help flag from the base command with usage '%s', "+
|
||||||
"but got the default with usage '%s'", usage, actual)
|
"but got the default with usage '%s'", usage, actual)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue