This package allows you to query the arguments of other processes on macOS.
Install the package and add to the application's go.mod
file by executing:
$ go get github.com/getargv/getargv.go@latest
If go.mod
is not being used to manage dependencies, import the package with:
import "github.com/getargv/getargv.go"
Getargv.asString(some_process_id, 0, false) #=> "arg0\x00arg1\x00"
Getargv.asBytes(some_process_id, 0, false) #=> []byte("arg0\x00arg1\x00")
Getargv.asStrings(some_process_id) #=> ["arg0","arg1"]
After checking out the repo, run go test
to run the tests.
Go code goes in getargv.go
. Test code in getargv_test.go
.
To install this package onto your local machine, run go install
. To release a new version, create a tag and push to GitHub which should get picked up by pkg.go.dev.
Bug reports and pull requests are welcome on GitHub at https://github.com/getargv/getargv.go.
The package is available as open source under the terms of the BSD 3-clause License.