diff --git a/internal/cli/app.go b/internal/cli/app.go index 126741b..09f8b50 100644 --- a/internal/cli/app.go +++ b/internal/cli/app.go @@ -22,8 +22,8 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" "github.com/strongdm/comply/internal/config" - "github.com/strongdm/comply/internal/jira" "github.com/strongdm/comply/internal/gitlab" + "github.com/strongdm/comply/internal/jira" "github.com/strongdm/comply/internal/plugin/github" "github.com/urfave/cli" ) diff --git a/internal/config/config.go b/internal/config/config.go index 66b0380..d963c08 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -33,11 +33,11 @@ func SetProjectRoot(dir string) { } type Project struct { - Name string `yaml:"name"` - Pandoc string `yaml:"pandoc,omitempty"` - FilePrefix string `yaml:"filePrefix"` - Tickets map[string]interface{} `yaml:"tickets"` - ApprovedBranch string `yaml:"approvedBranch"` + Name string `yaml:"name"` + Pandoc string `yaml:"pandoc,omitempty"` + FilePrefix string `yaml:"filePrefix"` + Tickets map[string]interface{} `yaml:"tickets"` + ApprovedBranch string `yaml:"approvedBranch"` } // SetPandoc records pandoc availability during initialization diff --git a/internal/gitlab/gitlab.go b/internal/gitlab/gitlab.go index 1b12ac5..f7dbbc6 100644 --- a/internal/gitlab/gitlab.go +++ b/internal/gitlab/gitlab.go @@ -5,21 +5,21 @@ import ( "strconv" "sync" - "github.com/xanzy/go-gitlab" "github.com/pkg/errors" "github.com/strongdm/comply/internal/model" + "github.com/xanzy/go-gitlab" ) const ( - cfgDomain = "domain" - cfgToken = "token" - cfgRepo = "repo" + cfgDomain = "domain" + cfgToken = "token" + cfgRepo = "repo" ) var prompts = map[string]string{ - cfgDomain: "Fully Qualified GitLab Domain", - cfgToken: "GitLab Token", - cfgRepo: "GitLab Repository", + cfgDomain: "Fully Qualified GitLab Domain", + cfgToken: "GitLab Token", + cfgRepo: "GitLab Repository", } // Prompts are human-readable configuration element names @@ -137,10 +137,10 @@ func (g *gitlabPlugin) LinkFor(t *model.Ticket) string { } func (g *gitlabPlugin) Create(ticket *model.Ticket, labels []string) error { - options := &gitlab.CreateIssueOptions{ - Title: gitlab.String(ticket.Name), - Description: gitlab.String(ticket.Body), - Labels: labels, + options := &gitlab.CreateIssueOptions{ + Title: gitlab.String(ticket.Name), + Description: gitlab.String(ticket.Body), + Labels: labels, } _, _, err := g.api().Issues.CreateIssue(g.reponame, options) return err diff --git a/internal/model/plugin.go b/internal/model/plugin.go index 9a879a3..89a448c 100644 --- a/internal/model/plugin.go +++ b/internal/model/plugin.go @@ -88,7 +88,7 @@ func GetPlugin(ts TicketSystem) TicketPlugin { cfgStringed[kS] = v } err := tp.Configure(cfgStringed) - if( err != nil) { + if err != nil { panic(fmt.Sprintf("Configuration error `%s` in project YAML", err)) } }