1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 14:23:11 +00:00

golint&gofmt

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-03-13 16:30:46 +10:00
parent 2cd6ec4db6
commit 355859e707
3 changed files with 13 additions and 12 deletions

View File

@@ -202,11 +202,11 @@ func listServices(c *cli.Context) error {
fmt.Printf("Enabled\n")
enabledServices := make([]string, len(currentConfig.Rancher.Services)+len(currentConfig.Rancher.ServicesInclude))
i := 0
for k, _ := range currentConfig.Rancher.Services {
for k := range currentConfig.Rancher.Services {
enabledServices[i] = k
i++
}
for k, _ := range currentConfig.Rancher.ServicesInclude {
for k := range currentConfig.Rancher.ServicesInclude {
enabledServices[i] = k
i++
}
@@ -224,7 +224,7 @@ func listServices(c *cli.Context) error {
}
if len(cachedConfigs[serviceName]) > 0 {
fmt.Printf("\t\tAlternatives: ")
for serviceLongName, _ := range cachedConfigs[serviceName] {
for serviceLongName := range cachedConfigs[serviceName] {
fmt.Printf("%s, ", serviceLongName)
}
fmt.Printf("\n")
@@ -235,7 +235,7 @@ func listServices(c *cli.Context) error {
if _, ok := currentConfig.Rancher.Services[serviceName]; ok {
continue
}
for serviceLongName, _ := range service {
for serviceLongName := range service {
fmt.Printf("\t%s: %s\n", serviceName, serviceLongName)
}
}
@@ -248,7 +248,7 @@ func GetAllServices() map[string]map[string]*libcomposeConfig.ServiceConfigV1 {
result := make(map[string]map[string]*libcomposeConfig.ServiceConfigV1)
cfg := config.LoadConfig()
for repoName, _ := range cfg.Rancher.Repositories {
for repoName := range cfg.Rancher.Repositories {
indexPath := fmt.Sprintf("%s/index.yml", repoName)
//content, err := network.LoadResource(indexPath, false)
content, err := network.CacheLookup(indexPath)