config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildDate = "not defined"

BuildDate is the date of the build It is set at build time

View Source
var Version = "development"

Version is the version of the application It is set at build time

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	// Version is the version of the application
	Version string
	// BuildDate is the date of the build
	BuildDate string
	// Prefix is the prefix of the generated files
	Prefix string `env:"TAGSVAR_PREFIX" default:""`
	// Suffix is the suffix of the generated files
	Suffix string `env:"TAGSVAR_SUFFIx" default:".vars"`
	// Verbose enables verbose output
	Verbose bool `env:"TAGSVAR_VERBOSE" default:"false"`
	// Silent disables output
	Silent bool `env:"TAGSVAR_SILENT" default:"false"`
}

AppConfig holds the configuration of the application It is loaded from environment variables or used default values.

var C *AppConfig

C is the global config It is initialized in the init() function

func (*AppConfig) Setup

func (c *AppConfig) Setup()

Setup : this function is called while the config is loaded by golobby/config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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