Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswalz committed Oct 14, 2020
1 parent 4b0f582 commit 5728e06
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions cmd/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ func TestToStructuredBranchList(t *testing.T) {
[]struct {
raw string
expectedFirstBranchName string
expectedAuthor string
expectedRelativeDate string
expectedAbsoluteDate string
expectedAuthor string
expectedRelativeDate string
expectedAbsoluteDate string
}{
{
`'Fri Sep 11 01:19:12 2020 -0400; John Doe; bf84c09; origin/other-branch; (3 days ago)'
Expand Down
1 change: 0 additions & 1 deletion cmd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,3 @@ func tagCurrentBranch(version string) error {
}
return err
}

5 changes: 2 additions & 3 deletions cmd/rootShell.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/spf13/cobra"
)


// ShellCmd represents the base command when called without any subcommands
var ShellCmd = &cobra.Command{
Use: "bit",
Expand Down Expand Up @@ -57,8 +56,8 @@ func CreateSuggestionMap(cmd *cobra.Command) (map[string][]prompt.Suggest, map[s
"switch": branchListSuggestions,
"co": branchListSuggestions,
"merge": branchListSuggestions,
"rebase": branchListSuggestions,
"log": branchListSuggestions,
"rebase": branchListSuggestions,
"log": branchListSuggestions,
"add": GitAddSuggestions(),
"release": {
{Text: "bump", Description: "Increment SemVer from tags and release"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func save(msg string) {
RunInTerminalWithColor("git", []string{"commit", "-a", "--amend", "--no-edit"}) // amend if already ahead
} else {
RunInTerminalWithColor("git", []string{"status", "-sb", "--untracked-files=no"})
resp := AskMultLine("Please provide a description of your changes")
resp := AskMultiLine("Please provide a description of your changes")
RunInTerminalWithColor("git", []string{"commit", "-a", "-m " + resp})
}
} else {
Expand Down
7 changes: 3 additions & 4 deletions cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func AskConfirm(q string) bool {
return ans
}

func AskMultLine(q string) string {
func AskMultiLine(q string) string {
text := ""
prompt := &survey.Multiline{
Message: q,
Expand Down Expand Up @@ -115,7 +115,7 @@ func BranchListSuggestions() []prompt.Suggest {
for _, branch := range branches {
suggestions = append(suggestions, prompt.Suggest{
Text: branch.Name,
Description: fmt.Sprintf("%s %s %s", branch.Author, branch.RelativeDate, branch.AbsoluteDate),
Description: fmt.Sprintf("%s %s %s", branch.Author, branch.RelativeDate, branch.AbsoluteDate),
})
}
return suggestions
Expand Down Expand Up @@ -232,7 +232,6 @@ func HandleExit() {
}
}


func AllBitSubCommands(rootCmd *cobra.Command) ([]*cobra.Command, map[string]*cobra.Command) {
bitCmds := rootCmd.Commands()
bitCmdMap := map[string]*cobra.Command{}
Expand Down Expand Up @@ -414,4 +413,4 @@ func fileExists(filename string) bool {
func isBranchCompletionCommand(command string) bool {

return command == "checkout" || command == "switch" || command == "co" || command == "merge"
}
}

0 comments on commit 5728e06

Please sign in to comment.