star/bed/cmdline/environment.go

19 lines
250 B
Go
Raw Permalink Normal View History

2025-04-26 19:33:14 +08:00
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()
}