config

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const FileName = "forge.yaml"

FileName is the project-level ForgeKit config file.

Variables

This section is empty.

Functions

func ResolveAuthor

func ResolveAuthor(cliAuthor string, projectDir string) string

ResolveAuthor picks author from merge priority.

Types

type ArchitectureConfig

type ArchitectureConfig struct {
	Rules []ArchitectureRule `yaml:"rules"`
}

type ArchitectureRule

type ArchitectureRule struct {
	From  string `yaml:"from"`
	To    string `yaml:"to"`
	Allow bool   `yaml:"allow"`
}

func DefaultArchitectureRules

func DefaultArchitectureRules() []ArchitectureRule

DefaultArchitectureRules returns ForgeKit reference layer rules.

type Config

type Config struct {
	Architecture ArchitectureConfig `yaml:"architecture"`
	Project      ProjectConfig      `yaml:"project"`
}

Config holds ForgeKit project settings.

func LoadProject

func LoadProject(root string) (Config, error)

LoadProject reads forge.yaml from project root if present.

type Global

type Global struct {
	Author string `yaml:"author"`
}

Global holds user-wide defaults (~/.config/forge/config.yaml).

func LoadGlobal

func LoadGlobal() Global

LoadGlobal reads ~/.config/forge/config.yaml when available.

type Merge

type Merge struct {
	Author string
}

Merge applies priority: CLI > env > project > global > defaults.

type ProjectConfig

type ProjectConfig struct {
	Language string `yaml:"language"`
	Module   string `yaml:"module"`
}

Jump to

Keyboard shortcuts

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