getargv

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

README

getargv

Go

This package allows you to query the arguments of other processes on macOS.

Installation

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"

Usage

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"]

Development

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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/getargv/getargv.go.

License

The package is available as open source under the terms of the BSD 3-clause License.

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsBytes

func AsBytes(pid pid_t, skip uint, nuls bool) ([]byte, error)

func AsString

func AsString(pid pid_t, skip uint, nuls bool) (string, error)

func AsStrings

func AsStrings(pid pid_t) ([]string, error)

Types

type Argv

type Argv = C.struct_ArgvResult

type ArgvArgc

type ArgvArgc = C.struct_ArgvArgcResult

type ArgvOptions

type ArgvOptions = C.struct_GetArgvOptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL