mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
18 lines
272 B
Go
18 lines
272 B
Go
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{})
|
|
}
|