Skip to content

Commit 2b0829d

Browse files
committed
Switch to using survey for prompts
We now use the survey package, which is a lot prettier. It also handles the use of an editor for the bio, etc, which is much MUCH better. This commit also enables the city and year flags on the create speaker command properly. Fixes #72
1 parent 2ea431c commit 2b0829d

File tree

2 files changed

+140
-191
lines changed

2 files changed

+140
-191
lines changed

cmd/speaker.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,14 @@ var createSpeakerCmd = &cobra.Command{
2929
Use: "speaker",
3030
Short: "Creates a new speaker for an event",
3131
Long: `Creates a new speaker for an event.
32-
You can provide the speaker's name as an argument to this command, but it must be the "cleaned" name.
3332
`,
34-
Example: ` devopsdays-cli create speaker george-bluth
33+
Example: ` devopsdays-cli create speaker
3534
devopsdays-cli create speaker --city new-york
36-
devopsdays-cli create speaker george-bluth -c "New York" --year "2017"`,
35+
devopsdays-cli create speaker -c "New York" --year "2017"`,
3736

3837
Args: cobra.MaximumNArgs(1),
3938
Run: func(cmd *cobra.Command, args []string) {
40-
if len(args) > 0 {
41-
create.CreateSpeaker(args[0], "", "")
42-
} else {
43-
create.CreateSpeaker("", "", "")
44-
}
39+
create.Speaker("", City, Year)
4540
},
4641
}
4742

0 commit comments

Comments
 (0)