config

package
v0.0.0-...-8c4d7ab Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 0 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 {
	ServerAddress string `envconfig:"SERVER_ADDRESS" default:":8081"`

	DataSource string `envconfig:"DATA_SOURCE" default:"todo.db"`

	LogLevel             int  `envconfig:"LOG_LEVEL" default:"1"` // trace: -1, debug: 0, info: 1, warn: 2
	HumanFriendlyLogging bool `envconfig:"HUMAN_FRIENDLY_LOGGING" default:"true"`
}

Config is the structure for the configuration data read from the env

func NewConfig

func NewConfig() *Config

NewConfig returns a config instance initialized with default values

Jump to

Keyboard shortcuts

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