mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-07 13:33:32 +02:00
golint
This commit is contained in:
@@ -538,13 +538,17 @@ func (c *Cli) FindIssues() (interface{}, error) {
|
||||
return data, nil
|
||||
}
|
||||
|
||||
// RankOrder type used to specify before/after ranking arguments to RankIssue
|
||||
type RankOrder int
|
||||
|
||||
const (
|
||||
// RANKBEFORE should be used to rank issue before the target issue
|
||||
RANKBEFORE RankOrder = iota
|
||||
// RANKAFTER should be used to rank issue after the target issue
|
||||
RANKAFTER RankOrder = iota
|
||||
)
|
||||
|
||||
// RankIssue will modify issue to have rank before or after the target issue
|
||||
func (c *Cli) RankIssue(issue, target string, order RankOrder) error {
|
||||
type RankRequest struct {
|
||||
Issues []string `json:"issues"`
|
||||
|
||||
@@ -645,6 +645,7 @@ func (c *Cli) CmdVote(issue string, up bool) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// CmdRankAfter rank issue after target issue
|
||||
func (c *Cli) CmdRankAfter(issue, after string) error {
|
||||
err := c.RankIssue(issue, after, RANKAFTER)
|
||||
if err != nil {
|
||||
@@ -656,6 +657,7 @@ func (c *Cli) CmdRankAfter(issue, after string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// CmdRankBefore rank issue before target issue
|
||||
func (c *Cli) CmdRankBefore(issue, before string) error {
|
||||
err := c.RankIssue(issue, before, RANKBEFORE)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user