state

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package state provides the project-scoped runtime state directory and initialization checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialized

func Initialized() bool

Initialized reports whether the context directory has been properly set up via "ctx init". Hooks should no-op when this returns false to avoid creating partial state (e.g. logs/) before initialization.

Returns:

  • bool: True if context directory is initialized

func StateDir

func StateDir() string

StateDir returns the project-scoped runtime state directory (.context/state/). Ensures the directory exists on each call - MkdirAll is a no-op when the directory is already present.

Returns:

  • string: Absolute path to the state directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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