github.com/LGUG2Z/story@v0.4.1/cli/errors.go (about)

     1  package cli
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  var ErrAlreadyWorkingOnAStory = fmt.Errorf("already working on a story")
     8  var ErrCommandRequiresAnArgument = fmt.Errorf("this command requires an argument")
     9  var ErrCommandTakesNoArguments = fmt.Errorf("this command takes no arguments")
    10  var ErrNotWorkingOnAStory = fmt.Errorf("not working on a story")
    11  var ErrGitHubAPITokenRequired = fmt.Errorf("an API token for GitHub is required, either using --github-api-token or $GITHUB_API_TOKEN")
    12  var ErrIssueURLRequired = fmt.Errorf("an issue URL is required")
    13  
    14  func ErrCouldNotFindOpenPullRequest(story string) error {
    15  	return fmt.Errorf("could not find an open pull request for %s", story)
    16  }
    17  
    18  func ErrCouldNotFindClosedPullRequest(story string) error {
    19  	return fmt.Errorf("could not find a closed pull request for %s", story)
    20  }