MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / Error

Method Error

cli/pkg/common/git.go:94–105  ·  view source on GitHub ↗

NameEmtpyError实现了 Error() 方法的对象都可以

()

Source from the content-addressed store, hash-verified

92
93// NameEmtpyError实现了 Error() 方法的对象都可以
94func (e *GitRepoAccessError) Error() string {
95 if e != nil {
96 if e.GitRepoAccessStatus == GitRepoStatusEnum_NotExists {
97 return "当前 git 仓库不存在"
98 } else if e.GitRepoAccessStatus == GitRepoStatusEnum_PrivateRepository {
99 return "当前 git 仓库为私有库"
100 } else if e.GitRepoAccessStatus == GitRepoStatusEnum_Other {
101 return "当前 git 仓库不存在或者为私有库"
102 }
103 }
104 return ""
105}
106
107// 检查错误
108func (g gitOperation) CheckError4RepositoryUrl(actualGitRepoUrl string, httpCode int) (err *GitRepoAccessError) {

Callers 2

GetRepositoryUrlMethod · 0.45
SparseCheckoutMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected