mirror of
https://github.com/foomo/posh-providers.git
synced 2025-10-16 12:35:41 +00:00
23 lines
333 B
Go
23 lines
333 B
Go
package k6
|
|
|
|
import (
|
|
"sort"
|
|
|
|
"github.com/samber/lo"
|
|
)
|
|
|
|
type Config struct {
|
|
Path string `json:"path" yaml:"path"`
|
|
Envs map[string]Env `json:"envs" yaml:"envs"`
|
|
}
|
|
|
|
func (c Config) Env(name string) Env {
|
|
return c.Envs[name]
|
|
}
|
|
|
|
func (c Config) EnvNames() []string {
|
|
ret := lo.Keys(c.Envs)
|
|
sort.Strings(ret)
|
|
return ret
|
|
}
|