config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config provides configuration for headercheck.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Templates []TemplateDef `yaml:"templates"`
	// Legacy/global defaults (optional): applied to templates without include/exclude
	Include string `yaml:"include"`
	Exclude string `yaml:"exclude"`
}

Config represents headercheck configuration. `templates` can be either a list of strings or a list of objects {path, include, exclude}.

func Load

func Load(explicitPath string, root string) (Config, error)

Load loads configuration from explicit path or common defaults.

type TemplateDef

type TemplateDef struct {
	Path    string `yaml:"path"`
	Include string `yaml:"include"`
	Exclude string `yaml:"exclude"`
}

TemplateDef represents a single template configuration with optional include/exclude.

Jump to

Keyboard shortcuts

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