config

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Rules RulesConfig `yaml:"rules"`
}

Config holds all user-configurable settings.

func Default

func Default() *Config

Default returns the config with hardcoded default values.

func Load

func Load() (*Config, error)

Load reads .layerx.yaml from the current directory. Returns default config if the file does not exist.

func LoadFrom

func LoadFrom(path string) (*Config, error)

LoadFrom reads config from the specified path. Returns default config if the file does not exist.

type RulesConfig

type RulesConfig struct {
	LowestEfficiency         float64 `yaml:"lowest-efficiency"`
	HighestWastedBytes       int64   `yaml:"highest-wasted-bytes"`
	HighestUserWastedPercent float64 `yaml:"highest-user-wasted-percent"`
}

RulesConfig holds CI rule thresholds.

Jump to

Keyboard shortcuts

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