mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +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:
@@ -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