项目作者: jonhadfield

项目描述 :
go library to find executables
高级语言: Go
项目地址: git://github.com/jonhadfield/findexec.git
创建时间: 2019-08-28T20:52:11Z
项目社区:https://github.com/jonhadfield/findexec

开源协议:The Unlicense

下载


findexec

travisci codecov Go Report Card GoDoc

A go library to find paths of executables

Usage

  1. package main
  2. import "github.com/jonhadfield/findexec"
  3. func main() {
  4. // find an executable called "diff" without specifying paths which will force
  5. // searching of the system paths found in environment variable 'PATH'
  6. _ = findexec.Find("diff", "")
  7. // find an executable called "bash" in specific paths
  8. _ = findexec.Find("bash", "/home/bin:/bin:/usr/local/bin")
  9. }

License

The source code is made available under the terms of the Unlicense License, as stated in the file LICENSE.

Credits

This is rewrite of the find_executable() function provided in the python 2 standard library.