-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
41 lines (33 loc) · 932 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"github.com/c-bata/go-prompt"
)
func main() {
config := NewConfig()
paceData := NewPaceData()
err := config.InitializeConfig()
if err != nil {
panic(err)
}
jiraClient, err := configureNewJiraClient(config.JiraInstanceUrl, config.JiraUsername, config.JiraPassword)
if err != nil {
panic(err)
}
err = paceData.loadIssueQueues(jiraClient, config)
if err != nil {
panic(err)
}
p := prompt.New(
paceExecutor(jiraClient, config, paceData),
paceCompletor(config, paceData),
prompt.OptionPrefix(">>> "),
prompt.OptionTitle("pace-prompt"),
prompt.OptionDescriptionBGColor(prompt.DarkGray),
prompt.OptionSuggestionBGColor(prompt.DarkBlue),
prompt.OptionSuggestionTextColor(prompt.White),
prompt.OptionSelectedDescriptionBGColor(prompt.DarkBlue),
prompt.OptionSelectedSuggestionBGColor(prompt.DarkBlue),
prompt.OptionSelectedSuggestionTextColor(prompt.White),
)
p.Run()
}