// Copyright 2017 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packageerrorsimport("fmt")typeInvalidRepoReferencestruct{Refstring}funcIsInvalidRepoReference(errerror)bool{_,ok:=err.(InvalidRepoReference)returnok}func(errInvalidRepoReference)Error()string{returnfmt.Sprintf("invalid repository reference [ref: %s]",err.Ref)}typeMirrorNotExiststruct{RepoIDint64}funcIsMirrorNotExist(errerror)bool{_,ok:=err.(MirrorNotExist)returnok}func(errMirrorNotExist)Error()string{returnfmt.Sprintf("mirror does not exist [repo_id: %d]",err.RepoID)}typeBranchAlreadyExistsstruct{Namestring}funcIsBranchAlreadyExists(errerror)bool{_,ok:=err.(BranchAlreadyExists)returnok}func(errBranchAlreadyExists)Error()string{returnfmt.Sprintf("branch already exists [name: %s]",err.Name)}