Skip to content

Commit

Permalink
use lo.Assign to shallow copy processes map
Browse files Browse the repository at this point in the history
  • Loading branch information
dangra committed Jan 25, 2023
1 parent 5970138 commit 41c2b34
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,13 +726,9 @@ type ProcessConfig struct {
func (c *Config) GetProcessConfigs(appLaunching bool) (map[string]ProcessConfig, error) {
res := make(map[string]ProcessConfig)
processCount := len(c.Processes)
configProcesses := make(map[string]string)
configProcesses := lo.Assign(c.Processes)
if processCount == 0 {
configProcesses[""] = ""
} else {
for k, v := range c.Processes {
configProcesses[k] = v
}
}
defaultProcessName := lo.Keys(configProcesses)[0]

Expand Down

0 comments on commit 41c2b34

Please sign in to comment.