procname

package
v12.60.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package procname provides methods for changing process name in the process tree

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// ErrWrongSize is returned if given slice have the wrong size
	ErrWrongSize = errors.New("Given slice must have same size as os.Arg")

	// ErrWrongArguments is returned if one of given arguments is empty
	ErrWrongArguments = errors.New("Arguments can't be empty")
)

Functions

func Replace

func Replace(from, to string) error

Replace replaces one argument in process command

WARNING: Be careful with using os.Args or options.Parse result as 'from' argument. After using this method given variable content will be replaced. Use strutil.Copy method in this case.

Example
Output:

func Set

func Set(args []string) error

Set changes current process command in process tree

Example
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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