Help us shape the future of Go! Take the 2026 Go Developer Survey

configurator

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 2 Imported by: 0

README

Configurator

Helpers for deployment and app setup.

go get -u github.com/a-novel-kit/configurator

GitHub Actions Workflow Status codecov

GitHub repo file or directory count GitHub code size in bytes

Coverage graph

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ENV = os.Getenv("ENV")

Functions

func LoadConfig

func LoadConfig[Cfg any](files ...ConfigFile) *Cfg

LoadConfig loads the configuration object from the provided files, in order. Files are automatically filtered using their environment property, and the current ENV value.

Types

type ConfigFile

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

ConfigFile represents an embedded .yaml file, that holds the configuration object.

func NewConfig added in v1.0.0

func NewConfig(env string, file []byte) ConfigFile

NewConfig creates a new ConfigFile object, targeted to a specific environment. To create a global configuration file, leave the environment empty.

Jump to

Keyboard shortcuts

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