config

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Filename names the config file
	Filename = ".bumpy-ride"
)

Variables

This section is empty.

Functions

func GetBytes

func GetBytes() (bv []byte, err error)

GetBytes reads the configuration file and returns its bytes

Types

type Config

type Config struct {
	NoFetch       bool        `json:"noFetch"`
	NoCommit      bool        `json:"noCommit"`
	VersionPrefix string      `json:"versionPrefix"`
	NPMPrefixes   []string    `json:"npmPrefixes"`
	Git           git.Handler `json:"-"`
}

Config defines the bumpy-ride configuration file

func Load added in v0.58.0

func Load() (cfg *Config, err error)

Load loads the configuration file, which must exist

func LoadOrCreate added in v0.58.0

func LoadOrCreate() (cfg *Config, created bool, err error)

LoadOrCreate loads the configuration file if it exists, or creates it otherwise

func New

func New() *Config

New returns an initial Config

func (*Config) Read

func (cfg *Config) Read() (err error)

Read reads the configuration file

func (*Config) Save

func (cfg *Config) Save() (err error)

Save writes the configuration file

Jump to

Keyboard shortcuts

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