config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPath         = "capcheck.json"
	DefaultBaselinePath = "capcheck.lock.json"
)

Variables

This section is empty.

Functions

func Normalise

func Normalise(cap string) string

func Write

func Write(path string, c Config) error

Types

type Config

type Config struct {
	Granularity   string   `json:"granularity,omitempty"`
	Timeout       Duration `json:"timeout,omitempty"`
	BaselinePath  string   `json:"baseline,omitempty"`
	BuildTags     string   `json:"build_tags,omitempty"`
	GOOS          string   `json:"goos,omitempty"`
	GOARCH        string   `json:"goarch,omitempty"`
	CapabilityMap string   `json:"capability_map,omitempty"`
	OmitPaths     bool     `json:"omit_paths,omitempty"`
	Ignore        []string `json:"ignore,omitempty"`
}

func Default

func Default() Config

func Load

func Load(path string) (Config, error)

func (Config) IsIgnored

func (c Config) IsIgnored(cap string) bool

type Duration

type Duration time.Duration

Duration wraps time.Duration so it marshals as a string like "5m" in JSON.

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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