config

package
v0.0.0-...-1342cf8 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Env cfg = func() cfg {
	if err := godotenv.Overload(); err != nil {
		log.Fatal("Error loading .env file: ", err)
	}
	return cfg{
		Host:   getEnv("HOST", "http://localhost"),
		Port:   getEnv("PORT", ":8080"),
		DBUser: dbUser,
		DBName: dbName,
		DBConnStr: fmt.Sprintf(
			"user=%s dbname=%s password==%s sslmode=disable", dbUser, dbName, dbPassword),
	}
}()

Functions

func DB

func DB() *sql.DB

Types

This section is empty.

Jump to

Keyboard shortcuts

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