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

config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalysisConfig

type AnalysisConfig struct {
	ExcludePatterns       []string `mapstructure:"exclude_patterns"`
	LargeFileThreshold    int      `mapstructure:"large_file_threshold"`
	LongFunctionThreshold int      `mapstructure:"long_function_threshold"`
	MinCommentRatio       float64  `mapstructure:"min_comment_ratio"`
}

AnalysisConfig contains settings for code analysis

type Config

type Config struct {
	Analysis AnalysisConfig `mapstructure:"analysis"`
	Output   OutputConfig   `mapstructure:"output"`
}

Config represents the application configuration

func Default

func Default() *Config

Default returns a Config with sensible default values

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

LoadConfig loads configuration from file, environment, and defaults Priority (highest to lowest): CLI flags > Environment variables > Config file > Defaults

func (*Config) Merge

func (c *Config) Merge(overrides map[string]interface{})

Merge merges CLI flag overrides into the config

type OutputConfig

type OutputConfig struct {
	Format  string `mapstructure:"format"`
	Verbose bool   `mapstructure:"verbose"`
}

OutputConfig contains settings for report output

Jump to

Keyboard shortcuts

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