mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-17 06:58:25 +00:00
Enable addtional linters (#34085)
enable mirror, usestdlibbars and perfsprint part of: https://github.com/go-gitea/gitea/issues/34083 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
56e42be36d
commit
ee3c82f874
294 files changed
+848
-805
No files matched your search
@@ -36,7 +36,7 @@ type Branch struct {
|
||||
// GetHEADBranch returns corresponding branch of HEAD.
|
||||
func (repo *Repository) GetHEADBranch() (*Branch, error) {
|
||||
if repo == nil {
|
||||
return nil, fmt.Errorf("nil repo")
|
||||
return nil, errors.New("nil repo")
|
||||
}
|
||||
stdout, _, err := NewCommand("symbolic-ref", "HEAD").RunStdString(repo.Ctx, &RunOpts{Dir: repo.Path})
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user