config

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultFileName = ".go-format.yml"

Variables

This section is empty.

Functions

func Discover

func Discover(startDir string) (string, bool, error)

func Marshal

func Marshal(cfg Config) ([]byte, error)

func WriteFile

func WriteFile(path string, cfg Config) error

Types

type Config

type Config struct {
	MaxLen          int      `yaml:"max_len"`
	SkipGoLines     bool     `yaml:"skip_golines"`
	SkipReadability bool     `yaml:"skip_readability"`
	Advice          bool     `yaml:"advice"`
	AdviceFail      bool     `yaml:"advice_fail"`
	Mutate          bool     `yaml:"mutate"`
	IncludeHidden   bool     `yaml:"include_hidden"`
	GoToolchain     string   `yaml:"go_toolchain"`
	Exclude         []string `yaml:"exclude"`
}

func Decode

func Decode(reader io.Reader, base Config) (Config, error)

func Defaults

func Defaults() Config

func LoadFile

func LoadFile(path string, base Config) (Config, error)

Jump to

Keyboard shortcuts

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