Skip to content

Commit 3efff76

Browse files
authored
Merge pull request #569 from devspace-cloud/refactor
Refactor
2 parents b9d9f00 + 96ac58a commit 3efff76

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+192
-808
lines changed

cmd/init.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,6 @@ func (cmd *InitCmd) Run(cobraCmd *cobra.Command, args []string) {
220220
}
221221
if newDeployment != nil {
222222
config.Deployments = &[]*latest.DeploymentConfig{newDeployment}
223-
224-
if cmd.useCloud && newDeployment.Component != nil && newDeployment.Component.Containers != nil && len(*newDeployment.Component.Containers) > 0 {
225-
(*newDeployment.Component.Containers)[0].Resources = &map[interface{}]interface{}{
226-
"limits": map[interface{}]interface{}{
227-
"cpu": "400m",
228-
"memory": "500Mi",
229-
},
230-
}
231-
}
232223
}
233224

234225
// Add the development configuration
@@ -237,7 +228,7 @@ func (cmd *InitCmd) Run(cobraCmd *cobra.Command, args []string) {
237228
// Save config
238229
err = configutil.SaveLoadedConfig()
239230
if err != nil {
240-
log.With(err).Fatalf("Config error: %s", err.Error())
231+
log.Fatalf("Config error: %v", err)
241232
}
242233

243234
// Check if .gitignore exists

cmd/list/available_components.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ func (cmd *availableComponentsCmd) RunListAvailableComponents(cobraCmd *cobra.Co
4949
})
5050
}
5151

52-
log.PrintTable(headerColumnNames, values)
52+
log.PrintTable(log.GetInstance(), headerColumnNames, values)
5353
}

cmd/list/clusters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (cmd *clustersCmd) RunListClusters(cobraCmd *cobra.Command, args []string)
9393
}
9494

9595
if len(values) > 0 {
96-
log.PrintTable(headerColumnNames, values)
96+
log.PrintTable(log.GetInstance(), headerColumnNames, values)
9797
} else {
9898
log.Infof("No clusters found. You can connect a cluster with `%s`", ansi.Color("devspace connect cluster", "white+b"))
9999
}

cmd/list/configs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ func (cmd *configsCmd) RunListConfigs(cobraCmd *cobra.Command, args []string) {
9898
})
9999
}
100100

101-
log.PrintTable(headerColumnNames, configRows)
101+
log.PrintTable(log.GetInstance(), headerColumnNames, configRows)
102102
}

cmd/list/deployments.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,5 @@ func (cmd *deploymentsCmd) RunDeploymentsStatus(cobraCmd *cobra.Command, args []
9595
}
9696
}
9797

98-
log.PrintTable(headerValues, values)
98+
log.PrintTable(log.GetInstance(), headerValues, values)
9999
}

cmd/list/ports.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ func (cmd *portsCmd) RunListPort(cobraCmd *cobra.Command, args []string) {
9191
})
9292
}
9393

94-
log.PrintTable(headerColumnNames, portForwards)
94+
log.PrintTable(log.GetInstance(), headerColumnNames, portForwards)
9595
}

cmd/list/providers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ func (cmd *providersCmd) RunListProviders(cobraCmd *cobra.Command, args []string
5555
})
5656
}
5757

58-
log.PrintTable(headerColumnNames, providerRows)
58+
log.PrintTable(log.GetInstance(), headerColumnNames, providerRows)
5959
}

cmd/list/selectors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ func (cmd *selectorsCmd) RunListSelectors(cobraCmd *cobra.Command, args []string
8585
})
8686
}
8787

88-
log.PrintTable(headerColumnNames, selectors)
88+
log.PrintTable(log.GetInstance(), headerColumnNames, selectors)
8989
}

cmd/list/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,5 @@ func (cmd *syncCmd) RunListSync(cobraCmd *cobra.Command, args []string) {
9393
})
9494
}
9595

96-
log.PrintTable(headerColumnNames, syncPaths)
96+
log.PrintTable(log.GetInstance(), headerColumnNames, syncPaths)
9797
}

cmd/list/vars.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ func (cmd *configsCmd) RunListVars(cobraCmd *cobra.Command, args []string) {
7373
})
7474
}
7575

76-
log.PrintTable(headerColumnNames, varRow)
76+
log.PrintTable(log.GetInstance(), headerColumnNames, varRow)
7777
}

0 commit comments

Comments
 (0)