dotenv

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MIT Imports: 3 Imported by: 0

README ¶

📦 Package dotenv

Source Path: pkg/dotenv

🚀 Functions

Viper

Viper reads environment variables from a configuration file based on the value of the APP_ENV environment variable. The configuration file is read using the viper package. If the APP_ENV variable is not set, the default value is "development".

The configuration file is read from the following locations:

  • development: .env
  • docker: /app/docker.env
  • production: /app/production.env
  • kubernetes: no configuration file is read

If an error occurs while reading the configuration file, an error is returned.

func Viper() error

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func Viper ¶

func Viper() error

Viper reads environment variables from a configuration file based on the value of the APP_ENV environment variable. The configuration file is read using the viper package. If the APP_ENV variable is not set, the default value is "development".

The configuration file is read from the following locations: - development: .env - docker: /app/docker.env - production: /app/production.env - kubernetes: no configuration file is read - test: no configuration file is read

If an error occurs while reading the configuration file, an error is returned.

Types ¶

This section is empty.

Jump to

Keyboard shortcuts

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