Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Adrian Samfira <[email protected]>
  • Loading branch information
gabriel-samfira committed Mar 17, 2024
1 parent fa75ecf commit bef8f30
Show file tree
Hide file tree
Showing 60 changed files with 12 additions and 74,934 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ require (
golang.org/x/crypto v0.16.0
golang.org/x/oauth2 v0.15.0
golang.org/x/sync v0.5.0
golang.org/x/text v0.14.0
gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gorm.io/datatypes v1.2.0
Expand Down
12 changes: 9 additions & 3 deletions params/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import (

"github.com/google/go-github/v57/github"
"github.com/google/uuid"
"golang.org/x/text/cases"
"golang.org/x/text/language"

commonParams "github.com/cloudbase/garm-provider-common/params"
"github.com/cloudbase/garm/util/appdefaults"
Expand Down Expand Up @@ -654,7 +652,15 @@ type GithubEntity struct {
}

func (g GithubEntity) LabelScope() string {
return cases.Title(language.English, cases.NoLower).String(g.EntityType.String())
switch g.EntityType {
case GithubEntityTypeRepository:
return MetricsLabelRepositoryScope
case GithubEntityTypeOrganization:
return MetricsLabelOrganizationScope
case GithubEntityTypeEnterprise:
return MetricsLabelEnterpriseScope
}
return ""
}

func (g GithubEntity) String() string {
Expand Down
3 changes: 2 additions & 1 deletion runner/common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package common
import (
"context"

"github.com/cloudbase/garm/params"
"github.com/google/go-github/v57/github"

"github.com/cloudbase/garm/params"
)

type GithubEntityOperations interface {
Expand Down
2 changes: 1 addition & 1 deletion util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"log/slog"
"net/http"

runnerErrors "github.com/cloudbase/garm-provider-common/errors"
"github.com/google/go-github/v57/github"
"github.com/pkg/errors"

runnerErrors "github.com/cloudbase/garm-provider-common/errors"
"github.com/cloudbase/garm/metrics"
"github.com/cloudbase/garm/params"
"github.com/cloudbase/garm/runner/common"
Expand Down
27 changes: 0 additions & 27 deletions vendor/golang.org/x/text/LICENSE

This file was deleted.

22 changes: 0 additions & 22 deletions vendor/golang.org/x/text/PATENTS

This file was deleted.

162 changes: 0 additions & 162 deletions vendor/golang.org/x/text/cases/cases.go

This file was deleted.

Loading

0 comments on commit bef8f30

Please sign in to comment.