state

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultStatePath

func DefaultStatePath() string

DefaultStatePath returns the default state file path.

func DescriptionKey

func DescriptionKey(projectName, branch string) string

DescriptionKey returns the key used for storing a feature's description.

Types

type State

type State struct {
	Descriptions map[string]string `yaml:"descriptions,omitempty"`
	// contains filtered or unexported fields
}

State holds persistent metadata that is not part of the config.

func Load

func Load(path string) (*State, error)

Load reads state from the given path. Returns empty state if file doesn't exist.

func (*State) DeleteDescription

func (s *State) DeleteDescription(key string)

DeleteDescription removes a description entry.

func (*State) GetDescription

func (s *State) GetDescription(key string) string

GetDescription returns the description for the given key.

func (*State) Save

func (s *State) Save() error

Save writes the state to its file path.

func (*State) SetDescription

func (s *State) SetDescription(key, desc string)

SetDescription sets or updates a description.

Jump to

Keyboard shortcuts

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