config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Session   string `json:"session" yaml:"session" toml:"session"`
	Year      int    `json:"year" yaml:"year" toml:"year"`
	Structure string `json:"structure" yaml:"structure" toml:"structure"`
}

func Merge

func Merge(a, b *Config) *Config

Merge merges two Configs, with the values of the second Config taking precedence. If a field is not set in the second Config, the value from the first Config is used. The result is a new Config.

func Parse

func Parse(path string) (*Config, error)

func ParseJSON

func ParseJSON(path string) (*Config, error)

func ParseTOML

func ParseTOML(path string) (*Config, error)

func ParseYAML

func ParseYAML(path string) (*Config, error)

func (*Config) Write

func (c *Config) Write(path string) error

func (*Config) WriteJSON

func (c *Config) WriteJSON(path string) error

func (*Config) WriteTOML

func (c *Config) WriteTOML(path string) error

func (*Config) WriteYAML

func (c *Config) WriteYAML(path string) error

Jump to

Keyboard shortcuts

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