File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -211,17 +211,17 @@ func createDefaultSSHKey(env *Environment) error {
211
211
sp .Template = customTemplate
212
212
sp .ResultTemplate = resultTemplate
213
213
sp .SelectedChoiceStyle = func (c * selection.Choice ) string {
214
- a , _ := c .Value .(article )
214
+ a , _ := c .Value .(KeyType )
215
215
216
- return blue .Bold ().Styled (a .Name ) + " " + termenv .String ("(" + a .ID + ")" ).Faint ().String ()
216
+ return blue .Bold ().Styled (a .Name ) + " " + termenv .String ("(" + a .KeyBaseName + ")" ).Faint ().String ()
217
217
}
218
218
sp .UnselectedChoiceStyle = func (c * selection.Choice ) string {
219
- a , _ := c .Value .(article )
219
+ a , _ := c .Value .(KeyType )
220
220
221
- return a .Name + " " + termenv .String ("(" + a .ID + ")" ).Faint ().String ()
221
+ return a .Name + " " + termenv .String ("(" + a .KeyBaseName + ")" ).Faint ().String ()
222
222
}
223
223
sp .ExtendedTemplateFuncs = map [string ]interface {}{
224
- "name" : func (c * selection.Choice ) string { return c .Value .(article ).Name },
224
+ "name" : func (c * selection.Choice ) string { return c .Value .(KeyType ).Name },
225
225
}
226
226
227
227
choice , err := sp .RunPrompt ()
@@ -797,4 +797,4 @@ func getDefaultKey(sshPath string) (error, string) {
797
797
}
798
798
799
799
return nil , keyfile
800
- }
800
+ }
Original file line number Diff line number Diff line change @@ -49,12 +49,11 @@ func Choices(sliceChoices interface{}) []*Choice {
49
49
choices := make ([]* Choice , 0 , slice .Len ())
50
50
for i := 0 ; i < slice .Len (); i ++ {
51
51
value := slice .Index (i ).Interface ()
52
- //fmt.Println(value)
53
52
choices = append (choices , NewChoice (value ))
54
53
}
55
54
56
55
return choices
57
56
default :
58
57
panic ("SliceChoices argument is not a slice" )
59
58
}
60
- }
59
+ }
You can’t perform that action at this time.
0 commit comments