state

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Content types.ContextAlias
	// contains filtered or unexported fields
}

func GetDefaultAlias

func GetDefaultAlias(stateDir string) (*Alias, error)

GetDefaultAlias get the default alias with the path to the state file set

func (*Alias) ContainsAlias

func (a *Alias) ContainsAlias(alias string) *string

ContainsAlias checks if the given alias already exists if yes, returns the context name that is currently mapped to the alias

func (*Alias) WriteAlias

func (a *Alias) WriteAlias(aliasName, contextName string) (*string, error)

WriteAlias write the alias state file with new Content returns the name of the overwritten context name in case there already exited a mapping context -> alias or returns nil

func (*Alias) WriteAllAliases

func (a *Alias) WriteAllAliases() error

WriteAllAliases overwrites the alias state file with new Content

Jump to

Keyboard shortcuts

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