config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfig

func CreateConfig() (*viper.Viper, error)

Helper function to create the config file using Viper

func GetHomeDir

func GetHomeDir() string

func ReadConfig

func ReadConfig() (*viper.Viper, error)

Helper function to read the config file using Viper

Types

type Config

type Config struct {
	PORT   string `mapstructure:"PORT"`
	DBNAME string `mapstructure:"DBNAME"`
}

Config structure to match the TOML structure

func GetConfig

func GetConfig() Config

Reads config and gives the config

Jump to

Keyboard shortcuts

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