19 lines
250 B
Go
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()
|
||
|
}
|