cli

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package clicontext provide support functions for working with cli.Context.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidContext = errors.New("internal error: invalid context")
)

Functions

func CreateTempDir

func CreateTempDir(settings *Settings) (path string, err error)

func NewContext

func NewContext(ctx context.Context, u *Settings) context.Context

func SetupPaths

func SetupPaths(envPath string) (err error)

SetupPaths will set PATH and VIRTUAL_ENV environment variables to our environment path.

Types

type Settings

type Settings struct {
	EnvPath  string // full path to the environment directory
	TempPath string // full path to the temp directory

	Frameworks framework.List // active frameworks

	Version string // the version string for output to command line
}

func FromContext

func FromContext(ctx context.Context) (*Settings, error)

Jump to

Keyboard shortcuts

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