We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main import ( _ "github.com/sakirsensoy/genv/dotenv/autoload" "fmt" "os" "test-genv/config" ) func main() { val, ok := os.LookupEnv("APP_HOST") fmt.Println(ok) // output: true fmt.Println(val) // output: localhost fmt.Println(config.App.Host) // output: "" fmt.Println(config.App.Port) // output: 8080 fmt.Println(config.App.Debug) // output: false }
golang ver: 1.21.1
The text was updated successfully, but these errors were encountered:
Here is a test https://github.com/anerg2046/genv-test
Sorry, something went wrong.
The current solution is to add an init.go file in the config package
package config import "fmt" func init() { fmt.Println("load env") }
No branches or pull requests
golang ver: 1.21.1
The text was updated successfully, but these errors were encountered: