Minor linting

This commit is contained in:
Nathan Baulch 2022-08-18 16:02:06 +10:00
parent 8f948f2d8b
commit 4316194dc6
4 changed files with 7 additions and 7 deletions

View file

@ -98,7 +98,7 @@ func mkCommandsTemplate(genTemplate func(commandDoc) string) string {
func init() {
argsTemplate := mkCommandsTemplate(func(doc commandDoc) string { return doc.Arguments })
parentTemplate := mkCommandsTemplate(func(doc commandDoc) string { return string(strings.TrimLeft(doc.Parent+" ", " ")) })
parentTemplate := mkCommandsTemplate(func(doc commandDoc) string { return strings.TrimLeft(doc.Parent+" ", " ") })
cli.CommandHelpTemplate = `NAME:
{{.Name}} - {{.Usage}}

View file

@ -182,7 +182,7 @@ func TestList_Symlink(t *testing.T) {
t.Fatal(err)
}
paths := []string{}
var paths []string
walkAllLocalRepositories(func(repo *LocalRepository) {
paths = append(paths, repo.RelPath)
})
@ -219,7 +219,7 @@ func TestList_Symlink_In_Same_Directory(t *testing.T) {
t.Fatal(err)
}
paths := []string{}
var paths []string
walkAllLocalRepositories(func(repo *LocalRepository) {
paths = append(paths, repo.RelPath)
})

View file

@ -26,7 +26,7 @@ type GitHubRepository struct {
url *url.URL
}
// URL reutrns URL of the repository
// URL returns URL of the repository
func (repo *GitHubRepository) URL() *url.URL {
return repo.url
}
@ -58,12 +58,12 @@ type GitHubGistRepository struct {
url *url.URL
}
// URL returns URL of the GistRepositroy
// URL returns URL of the GistRepository
func (repo *GitHubGistRepository) URL() *url.URL {
return repo.url
}
// IsValid determine if the gist rpository is valid or not
// IsValid determine if the gist repository is valid or not
func (repo *GitHubGistRepository) IsValid() bool {
return true
}

View file

@ -29,7 +29,7 @@ Last Changed Date: 2019-08-16 15:16:45 +0900 (Fri, 16 Aug 2019)
func TestVCSBackend(t *testing.T) {
tempDir := newTempDir(t)
localDir := filepath.Join(tempDir, "repo")
_commands := []*exec.Cmd{}
var _commands []*exec.Cmd
lastCommand := func() *exec.Cmd { return _commands[len(_commands)-1] }
defer func(orig func(cmd *exec.Cmd) error) {
cmdutil.CommandRunner = orig