settings

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNameContainsSpace = errors.New("name contains a space")
)

Functions

This section is empty.

Types

type Settings

type Settings struct {
	Enabled *bool
	Names   []string
}

Settings holds all the settings.

func (*Settings) Copy

func (s *Settings) Copy() Settings

Copy returns a copy of the settings.

func (*Settings) OverrideWith

func (s *Settings) OverrideWith(other Settings)

OverrideWith overrides the settings with another settings struct.

func (*Settings) SetDefaults

func (s *Settings) SetDefaults()

SetDefaults sets the default values for the settings if they are not already set.

func (Settings) String

func (s Settings) String() string

String returns a string representation of the settings.

func (*Settings) Validate

func (s *Settings) Validate() error

Validate validates the settings and returns an error if one setting is not valid.

Jump to

Keyboard shortcuts

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