summaryrefslogtreecommitdiffstats
path: root/modules/git/error.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-02-21 23:04:20 +0000
committerGitHub <noreply@github.com>2020-02-21 17:04:20 -0600
commitc8d1c3812980573eae0a1ecd5e84c8b44457c3e4 (patch)
tree29ea510382c64bd6355588a8ac03255425338f33 /modules/git/error.go
parent6b019724f3294fd04b9a7c4d3a3e60107977eb64 (diff)
downloadgitea-c8d1c3812980573eae0a1ecd5e84c8b44457c3e4.tar.gz
gitea-c8d1c3812980573eae0a1ecd5e84c8b44457c3e4.zip
Render READMEs in docs/ .gitea or .github from root (#10361)
* Render READMEs in docs/ .gitea or .github from root
Diffstat (limited to 'modules/git/error.go')
-rw-r--r--modules/git/error.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/git/error.go b/modules/git/error.go
index 6e4f26de13..9266c41b06 100644
--- a/modules/git/error.go
+++ b/modules/git/error.go
@@ -50,6 +50,12 @@ func (err ErrBadLink) Error() string {
return fmt.Sprintf("%s: %s", err.Name, err.Message)
}
+// IsErrBadLink if some error is ErrBadLink
+func IsErrBadLink(err error) bool {
+ _, ok := err.(ErrBadLink)
+ return ok
+}
+
// ErrUnsupportedVersion error when required git version not matched
type ErrUnsupportedVersion struct {
Required string