config

package
v2.3.12 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilFile = fmt.Errorf("no file")
	ErrNoPath  = fmt.Errorf("no file path")
)

Functions

func Merge

func Merge(a, b map[string]interface{}) map[string]interface{}

func MergeWithComment

func MergeWithComment(a, b map[string]interface{}, comment string) map[string]interface{}

Types

type Json

type Json struct {
	// contains filtered or unexported fields
}

func NewJson

func NewJson(config *JsonConfig) (*Json, error)

func (*Json) Close

func (j *Json) Close() error

func (*Json) Drop

func (j *Json) Drop() error

func (*Json) Lock

func (j *Json) Lock() error

func (*Json) Open

func (j *Json) Open(filePath string) (database.Driver, error)

func (*Json) Run

func (j *Json) Run(migration io.Reader) error

func (*Json) SetVersion

func (j *Json) SetVersion(version int, dirty bool) error

func (*Json) Unlock

func (j *Json) Unlock() error

func (*Json) Version

func (j *Json) Version() (int, bool, error)

type JsonConfig

type JsonConfig struct {
	Path        string
	WithComment string
}

type Yaml

type Yaml struct {
	// contains filtered or unexported fields
}

func NewYaml

func NewYaml(config *YamlConfig) (*Yaml, error)

func (*Yaml) Close

func (y *Yaml) Close() error

func (*Yaml) Drop

func (y *Yaml) Drop() error

func (*Yaml) Lock

func (y *Yaml) Lock() error

func (*Yaml) Open

func (y *Yaml) Open(filePath string) (database.Driver, error)

func (*Yaml) Run

func (y *Yaml) Run(migration io.Reader) error

func (*Yaml) SetVersion

func (y *Yaml) SetVersion(version int, dirty bool) error

func (*Yaml) Unlock

func (y *Yaml) Unlock() error

func (*Yaml) Version

func (y *Yaml) Version() (int, bool, error)

type YamlConfig

type YamlConfig struct {
	Path        string
	WithComment string
}

Jump to

Keyboard shortcuts

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