envpath

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(entry string) (bool, error)

Add adds a path entry to the PATH env file

func IndexOf

func IndexOf(paths []string, p string) int

IndexOf searches the given path list for first occurence of the given path entry and returns the index, or -1

func Paths

func Paths() ([]string, error)

Paths parses the PATH.env file and returns a slice of valid paths

func Remove

func Remove(entry string) (bool, error)

Remove adds a path entry to the PATH env file

Types

type Warning

type Warning struct {
	LineNumber int
	Line       string
	Message    string
}

func Parse

func Parse(b []byte, envname string) ([]string, []Warning)

Parse will return a list of paths from an export file

Jump to

Keyboard shortcuts

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