commands

package
v0.0.0-...-15a8384 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

PATH type handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitApplication

func ExitApplication(output string)

func Which

func Which(command string) (string, error)

Types

type Editor

type Editor struct {
	Path       *Path
	Cwd        string
	Command    string
	CommandMap map[string]string
}

Editor object for git

func NewEditor

func NewEditor() *Editor

NewEditor create a new git object

func (Editor) Edit

func (g Editor) Edit(args ...string) ([]string, []string, error)

func (Editor) Execute

func (g Editor) Execute(args ...string) ([]string, []string, error)

func (Editor) Prefix

func (g Editor) Prefix() string

type Path

type Path struct {
	Type        string
	Home        string
	Directories []string
}

func NewPath

func NewPath(pathname string) *Path

func (*Path) AppendPath

func (p *Path) AppendPath(inputdir string) error

AppendPath append a path to the list of Directories

func (Path) HavePath

func (p Path) HavePath(inputdir string) bool

func (*Path) Import

func (p *Path) Import(path string)

func (Path) IsEmpty

func (p Path) IsEmpty() bool

func (Path) Lookup

func (p Path) Lookup(target string) (string, error)

func (Path) LookupMulti

func (p Path) LookupMulti(targets ...string) (string, error)

func (Path) LookupPlatform

func (p Path) LookupPlatform(pathmap map[string]string) (string, error)

LookupPlatform lookup paths based on platform

func (Path) MapGetPlatform

func (p Path) MapGetPlatform(pathmap map[string]string) (string, error)

func (Path) Prefix

func (p Path) Prefix() string

func (*Path) PrependPath

func (p *Path) PrependPath(inputdir string) error

func (Path) ReturnExport

func (p Path) ReturnExport() string

Jump to

Keyboard shortcuts

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