Skip to content

Commit

Permalink
fix: process map keys instead of values
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebradil committed Sep 19, 2023
1 parent ffb47ad commit 3b86a03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/myks/globe.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/creasty/defaults"
"github.com/rs/zerolog/log"
"golang.org/x/exp/maps"
yaml "gopkg.in/yaml.v3"
)

Expand Down Expand Up @@ -141,7 +142,7 @@ func New(rootDir string) *Globe {
func (g *Globe) Init(asyncLevel int, envSearchPathToAppMap EnvAppMap) error {
envAppMap := g.collectEnvironments(envSearchPathToAppMap)

return process(asyncLevel, envAppMap, func(item interface{}) error {
return process(asyncLevel, maps.Keys(envAppMap), func(item interface{}) error {
envPath, ok := item.(string)
if !ok {
return fmt.Errorf("Unable to cast item to string")
Expand Down

0 comments on commit 3b86a03

Please sign in to comment.