Fix lint errors
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
a4ac85aa4a
commit
884be62a4d
32 changed files with 127 additions and 161 deletions
|
|
@ -493,13 +493,13 @@ func formatPools(pools []params.Pool) {
|
|||
switch {
|
||||
case pool.RepoID != "" && pool.RepoName != "":
|
||||
belongsTo = pool.RepoName
|
||||
level = "repo"
|
||||
level = entityTypeRepo
|
||||
case pool.OrgID != "" && pool.OrgName != "":
|
||||
belongsTo = pool.OrgName
|
||||
level = "org"
|
||||
level = entityTypeOrg
|
||||
case pool.EnterpriseID != "" && pool.EnterpriseName != "":
|
||||
belongsTo = pool.EnterpriseName
|
||||
level = "enterprise"
|
||||
level = entityTypeEnterprise
|
||||
}
|
||||
row := table.Row{pool.ID, pool.Image, pool.Flavor, strings.Join(tags, " "), belongsTo, pool.Enabled}
|
||||
if long {
|
||||
|
|
@ -532,13 +532,13 @@ func formatOnePool(pool params.Pool) {
|
|||
switch {
|
||||
case pool.RepoID != "" && pool.RepoName != "":
|
||||
belongsTo = pool.RepoName
|
||||
level = "repo"
|
||||
level = entityTypeRepo
|
||||
case pool.OrgID != "" && pool.OrgName != "":
|
||||
belongsTo = pool.OrgName
|
||||
level = "org"
|
||||
level = entityTypeOrg
|
||||
case pool.EnterpriseID != "" && pool.EnterpriseName != "":
|
||||
belongsTo = pool.EnterpriseName
|
||||
level = "enterprise"
|
||||
level = entityTypeEnterprise
|
||||
}
|
||||
|
||||
t.AppendHeader(header)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ import (
|
|||
"github.com/cloudbase/garm/params"
|
||||
)
|
||||
|
||||
const (
|
||||
entityTypeOrg string = "org"
|
||||
entityTypeRepo string = "repo"
|
||||
entityTypeEnterprise string = "enterprise"
|
||||
)
|
||||
|
||||
var (
|
||||
cfg *config.Config
|
||||
mgr config.Manager
|
||||
|
|
|
|||
|
|
@ -446,13 +446,13 @@ func formatScaleSets(scaleSets []params.ScaleSet) {
|
|||
switch {
|
||||
case scaleSet.RepoID != "" && scaleSet.RepoName != "":
|
||||
belongsTo = scaleSet.RepoName
|
||||
level = "repo"
|
||||
level = entityTypeRepo
|
||||
case scaleSet.OrgID != "" && scaleSet.OrgName != "":
|
||||
belongsTo = scaleSet.OrgName
|
||||
level = "org"
|
||||
level = entityTypeOrg
|
||||
case scaleSet.EnterpriseID != "" && scaleSet.EnterpriseName != "":
|
||||
belongsTo = scaleSet.EnterpriseName
|
||||
level = "enterprise"
|
||||
level = entityTypeEnterprise
|
||||
}
|
||||
t.AppendRow(table.Row{scaleSet.ID, scaleSet.Name, scaleSet.Image, scaleSet.Flavor, belongsTo, level, scaleSet.Enabled, scaleSet.GetRunnerPrefix(), scaleSet.ProviderName})
|
||||
t.AppendSeparator()
|
||||
|
|
@ -476,13 +476,13 @@ func formatOneScaleSet(scaleSet params.ScaleSet) {
|
|||
switch {
|
||||
case scaleSet.RepoID != "" && scaleSet.RepoName != "":
|
||||
belongsTo = scaleSet.RepoName
|
||||
level = "repo"
|
||||
level = entityTypeRepo
|
||||
case scaleSet.OrgID != "" && scaleSet.OrgName != "":
|
||||
belongsTo = scaleSet.OrgName
|
||||
level = "org"
|
||||
level = entityTypeOrg
|
||||
case scaleSet.EnterpriseID != "" && scaleSet.EnterpriseName != "":
|
||||
belongsTo = scaleSet.EnterpriseName
|
||||
level = "enterprise"
|
||||
level = entityTypeEnterprise
|
||||
}
|
||||
|
||||
t.AppendHeader(header)
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ func maybeUpdateURLsFromConfig(cfg config.Config, store common.Store) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
//gocyclo:ignore
|
||||
func main() {
|
||||
flag.Parse()
|
||||
if *version {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue