Skip to content

Commit 8500733

Browse files
author
minivera
committed
Gofmt'd the whole project
1 parent 5ff80d1 commit 8500733

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

example_prompt_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package promptui
22

33
import (
4-
"strconv"
54
"fmt"
5+
"strconv"
66
)
77

88
// This example shows how to use the prompt validator and templates to create a stylized prompt.
@@ -39,4 +39,3 @@ func ExamplePrompt() {
3939
// The result of the prompt, if valid, is displayed in a formatted message.
4040
fmt.Printf("You answered %s\n", result)
4141
}
42-

example_select_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ func ExampleSelect() {
7272

7373
// The selected pepper will be displayed with its name and index in a formatted message.
7474
fmt.Printf("You choose number %d: %s\n", i+1, peppers[i].Name)
75-
}
75+
}

select.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,26 @@ type Select struct {
9999
// and trigger search mode. See the Key struct docs for more information on keys.
100100
type SelectKeys struct {
101101
// Next is the key used to move to the next element inside the list. Defaults to down arrow key.
102-
Next Key
102+
Next Key
103103

104104
// Prev is the key used to move to the previous element inside the list. Defaults to up arrow key.
105-
Prev Key
105+
Prev Key
106106

107107
// PageUp is the key used to jump back to the first element inside the list. Defaults to left arrow key.
108-
PageUp Key
108+
PageUp Key
109109

110110
// PageUp is the key used to jump forward to the last element inside the list. Defaults to right arrow key.
111111
PageDown Key
112112

113113
// Search is the key used to trigger the search mode for the list. Default to the "/" key.
114-
Search Key
114+
Search Key
115115
}
116116

117117
// Key defines a keyboard code and a display representation for the help menu.
118118
type Key struct {
119119
// Code is a rune that will be used to compare against typed keys with readline.
120120
// Check https://github.com/chzyer/readline for a list of codes
121-
Code rune
121+
Code rune
122122

123123
// Display is the string that will be displayed inside the help menu to help inform the user
124124
// of which key to use on his keyboard for various functions.

styles.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ var (
1010
IconInitial = Styler(FGBlue)("?")
1111

1212
// IconGood is the icon used when a good answer is entered in prompt mode.
13-
IconGood = Styler(FGGreen)("✔")
13+
IconGood = Styler(FGGreen)("✔")
1414

1515
// IconWarn is the icon used when a good, but potentially invalid answer is entered in prompt mode.
16-
IconWarn = Styler(FGYellow)("⚠")
16+
IconWarn = Styler(FGYellow)("⚠")
1717

1818
// IconBad is the icon used when a bad answer is entered in prompt mode.
19-
IconBad = Styler(FGRed)("✗")
19+
IconBad = Styler(FGRed)("✗")
2020

2121
// IconSelect is the icon used to identify the currently selected item in select mode.
22-
IconSelect = Styler(FGBold)("▸")
22+
IconSelect = Styler(FGBold)("▸")
2323
)

styles_windows.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ var (
88
IconInitial = Styler(FGBlue)("?")
99

1010
// IconGood is the icon used when a good answer is entered in prompt mode.
11-
IconGood = Styler(FGGreen)("v")
11+
IconGood = Styler(FGGreen)("v")
1212

1313
// IconWarn is the icon used when a good, but potentially invalid answer is entered in prompt mode.
14-
IconWarn = Styler(FGYellow)("!")
14+
IconWarn = Styler(FGYellow)("!")
1515

1616
// IconBad is the icon used when a bad answer is entered in prompt mode.
17-
IconBad = Styler(FGRed)("x")
17+
IconBad = Styler(FGRed)("x")
1818

1919
// IconBad is the icon used to identify the currently selected item in select mode.
20-
IconSelect = Styler(FGBold)(">")
20+
IconSelect = Styler(FGBold)(">")
2121
)

0 commit comments

Comments
 (0)