config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(configName string, configPaths []string, data any, defaults ...map[string]any) error

LoadConfig loads the configuration from the specified paths.

func LoadConfigByKey added in v0.12.0

func LoadConfigByKey(configName, key string, configPaths []string, data any, defaults ...map[string]any) error

Types

type Config

type Config struct {
	Env    string
	Server ServerConfig
}

Config represents the application configuration.

func GetAppConfig

func GetAppConfig() *Config

GetConfig returns the application configuration.

type ServerConfig

type ServerConfig struct {
	Port string
}

Jump to

Keyboard shortcuts

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