Skip to content

Commit

Permalink
golint
Browse files Browse the repository at this point in the history
  • Loading branch information
coryb committed Aug 29, 2016
1 parent a20f233 commit 44cdebf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 2 additions & 0 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 44cdebf

Please sign in to comment.