context

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectDirNotFound     = fmt.Errorf("could not determine project directory")
	ErrWorkDirNotFound        = fmt.Errorf("could not determine current working directory")
	ErrWorkDirNotInProjectDir = fmt.Errorf("workDir must be the projectDir or a subdirectory of projectDir")
)

Functions

func DecodeEnvValue

func DecodeEnvValue(value string) string

func GetCIDEnvironment

func GetCIDEnvironment(configEnv map[string]string, projectDirectory string) (map[string]string, error)

GetCIDEnvironment returns the normalized ci variables

Types

type CIDContext

type CIDContext struct {
	ProjectDir  string                       // ProjectDir is the root directory of the project
	WorkDir     string                       // WorkDir is the current working directory, must be a subdirectory of ProjectDir or ProjectDir itself
	Config      *config.CIDConfig            // Config is the CID configuration for the project
	Env         map[string]string            // Env holds the resolved environment variables for the project
	Modules     []*analyzerapi.ProjectModule // Modules is a list of all discovered modules in the project
	Executables []executable.Executable      // Executables is a list of all executable candidates usable for command execution
}

func NewAppContext

func NewAppContext() (*CIDContext, error)

func NewAppContextFromDir added in v0.6.0

func NewAppContextFromDir(projectDir string, workDir string) (*CIDContext, error)

Jump to

Keyboard shortcuts

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