-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes cli#32. Also exports error types.
- Loading branch information
Showing
4 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package errors | ||
|
||
import "errors" | ||
|
||
// NoRepositoriesError is returned when go-gh is unable to determine current repository, | ||
// when no git remotes configured for this repository. | ||
type NoRepositoriesError struct { | ||
error | ||
} | ||
|
||
// NoRepositoryHostsError is returned when go-gh is unable to determine current repository, | ||
// when none of the git remotes configured for this repository point to a known GitHub host. | ||
type NoRepositoryHostsError struct { | ||
error | ||
} | ||
|
||
// NotFoundError is returned when there is no authentication token for the host. | ||
type NotFoundError struct { | ||
error | ||
} | ||
|
||
var ( | ||
ErrNoRepositories = NoRepositoriesError{errors.New("unable to determine current repository, no git remotes configured for this repository")} | ||
ErrNoRepositoryHosts = NoRepositoryHostsError{errors.New("unable to determine current repository, none of the git remotes configured for this repository point to a known GitHub host")} | ||
ErrNotFound = NotFoundError{errors.New("not found")} | ||
) |