defaults

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGoMod

func DefaultGoMod(opts Options) string

func Read

func Read(name string) ([]byte, error)

Read returns the content of a built-in default config file by name.

func WriteAll

func WriteAll(dir string, opts ...Options) error

WriteAll writes every default config file into dir that is not already present, leaving existing files untouched. This makes `-init-config` idempotent: re-running it on an older config dir adds newly-introduced defaults without clobbering edits or erroring on the files that already exist. The config directory is a real Go module, so editors and `go test` work without users running `go mod init`.

func WriteDefault

func WriteDefault(dir, name string, opts ...Options) error

WriteDefault writes a built-in default file into dir if it does not already exist. name must be "config.go" or "go.mod".

Types

type Options

type Options struct {
	PlumsVersion   string
	PlumsModuleDir string
}

Jump to

Keyboard shortcuts

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