config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package config loads and writes the committed skeeper project config.

Index

Constants

View Source
const (
	// Filename is the committed project config file.
	Filename = ".skeeper.yml"
	// DirectoryBranchSegment separates a sidecar directory namespace from
	// branch-specific sidecar refs.
	DirectoryBranchSegment = "__branches__"
)

Variables

This section is empty.

Functions

func CleanDirectory

func CleanDirectory(directory string) (string, error)

CleanDirectory validates a sidecar directory namespace and returns its canonical slash-separated form. The empty string is valid legacy behavior.

func DefaultPatterns

func DefaultPatterns() []string

DefaultPatterns returns the interactive init defaults.

func Save

func Save(root string, cfg Config) error

Save writes cfg to .skeeper.yml under root.

Types

type Config

type Config struct {
	Sidecar   string   `yaml:"sidecar"`
	Directory string   `yaml:"directory,omitempty"`
	Bootstrap string   `yaml:"bootstrap,omitempty"`
	Patterns  []string `yaml:"patterns"`
}

Config describes how a project mirrors spec files into its sidecar repo.

func Load

func Load(root string) (Config, error)

Load reads and validates .skeeper.yml from root.

func (Config) Normalize

func (c Config) Normalize() (Config, error)

Normalize validates cfg and returns the canonical config values that should drive runtime behavior.

func (Config) Validate

func (c Config) Validate() error

Validate checks that the config can drive deterministic v1 behavior.

Jump to

Keyboard shortcuts

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