Help us shape the future of Go! Take the 2026 Go Developer Survey

clarityconfig

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package clarityconfig loads the opt-in configuration stored under a repo's .clarity directory. It is the single source of truth for module declarations so every consumer (`clarity show --collapse`, `clarity show --module <name>`, and `clarity modules`) resolves the same set and cannot drift apart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadModules

func LoadModules(repoRoot string) ([]depgraph.Module, error)

LoadModules reads .clarity/modules.json from repoRoot and returns the declared modules with their file patterns expanded (globs) and resolved to absolute graph-node paths. It returns nil with no error when the file is absent, so module config is purely opt-in. Globs that match nothing are not an error: CollapseModules already ignores members absent from the graph.

func LoadModulesFromContent added in v0.28.0

func LoadModulesFromContent(repoRoot, source string, data []byte, treeFiles []string) ([]depgraph.Module, error)

LoadModulesFromContent parses a modules.json snapshot and resolves file patterns against the supplied absolute tree file list.

Types

This section is empty.

Jump to

Keyboard shortcuts

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