env

package
v0.0.0-...-7e2b257 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shell

type Shell string

Shell represents the type of shell.

func ValidShells

func ValidShells() []Shell

ValidShells returns a list of supported shell types.

func (Shell) EvalCommand

func (s Shell) EvalCommand(cmd string) string

EvalCommand returns the script that evaluates the given command.

func (Shell) Prompt

func (s Shell) Prompt(goos string) string

Prompt returns the typical prompt for a given os.

func (Shell) Validate

func (s Shell) Validate() error

Validate checks if the shell is valid.

type Template

type Template interface {
	// ParseFiles parses the named files and associates the resulting templates with t.
	ParseFiles(filenames ...string) error
	// ExecuteTemplate applies the template associated with t for the given shell
	// to the specified data object and writes the output to wr.
	ExecuteTemplate(wr io.Writer, shell string, data interface{}) error
}

Template provides an abstraction for go templates.

func NewTemplate

func NewTemplate(filenames ...string) Template

NewTemplate creates a new Template instance with the given filenames.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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