star/bed/cmdline/environment.go
2025-04-26 19:33:14 +08:00

19 lines
250 B
Go

package cmdline
import "os"
type env interface {
Get(string) string
List() []string
}
type environment struct{}
func (*environment) Get(key string) string {
return os.Getenv(key)
}
func (*environment) List() []string {
return os.Environ()
}