stacks

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package stacks parses and validates the A_NOVEL_STACKS environment variable, the daemon's single source of truth for which checkouts to manage.

Format: "name1:/path1,name2:/path2,..." — first entry is the default stack. Unset / empty: a single inferred stack named "default" at ~/git-projects/a-novel.

Index

Constants

View Source
const DefaultName = "default"

Default stack name when none is specified.

View Source
const EnvVar = "A_NOVEL_STACKS"

EnvVar is the env var name read at daemon start.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack struct {
	Name      string
	Path      string
	IsDefault bool
}

Stack is one registered git-checkout the daemon manages.

func Parse

func Parse(raw string) ([]Stack, error)

Parse reads $A_NOVEL_STACKS (or the provided raw string for testing) and returns the ordered list of stacks. The first entry is marked default. Returns at least one stack on success — falls back to the implicit default at ~/git-projects/a-novel if the env var is unset or empty.

func ParseEnv

func ParseEnv() ([]Stack, error)

ParseEnv is Parse(os.Getenv(EnvVar)).

Jump to

Keyboard shortcuts

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