package
module
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Aug 13, 2024
License: GPL-3.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
README
¶
go-config
Golang config loader to parse environment variables into structs
Using joho/godotenv and caarlos0/env as base.
Implementation
Just take a look at the test file ( *_test.go )
Run test
go test -count=1 -coverprofile=coverage.out -coverpkg=./... && go tool cover -html=coverage.out -o cover.html
Documentation
¶
func LoadConfig(config interface{}) (err error)
LoadConfig: load the config based on .env file or on local env automatically parse to struct.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.