diff options
Diffstat (limited to 'pkg/lookpath/env.go')
-rw-r--r-- | pkg/lookpath/env.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/lookpath/env.go b/pkg/lookpath/env.go new file mode 100644 index 0000000..dc376e7 --- /dev/null +++ b/pkg/lookpath/env.go @@ -0,0 +1,18 @@ +package lookpath + +import "os" + +type Env interface { + Getenv(name string) string +} + +type defaultEnv struct { +} + +func (*defaultEnv) Getenv(name string) string { + return os.Getenv(name) +} + +func LookPath(file string) (string, error) { + return LookPath2(file, &defaultEnv{}) +} |