func Which(name string) string {
	paths := Get().Path()
	for _, path := range paths {
		if syscall.Access(path+"/"+name, syscall.F_OK) == nil {
			return path + "/" + name
		}
	}
	return ""
}
Which find full path to some app
package env
import (
	"os"
	"strconv"
	"strings"
	"syscall"
)
type Env map[string]string
func Get() Env {
	env := make(Env)
	for _, ev := range os.Environ() {
		evs := strings.Split(ev, "=")
		k, v := evs[0], evs[1]
		env[k] = v
	}
	return env
}