package
module
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: May 28, 2025
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
EnvReader
A lightweight .env file reader for Go, designed to load environment variables from a file into your application seamlessly.
Features
- Reads
.env files and loads key-value pairs as environment variables.
Installation
Run the following command in your project folder to install:
go get github.com/udan-jayanith/envReader
Documentation
¶
.env file reader for go.
`envReader "github.com/udan-jayanith/envReader"`
GetRealValue returns value for given field as any(int, float64 and string).
only returns int, float64 and strings by the GetRealValue.
GetValue returns the value for given field as a string.
LoadEnv parses the env file using given path and file.
Ex: LoadEnv("./", "foo.env").
type Type struct {
Value string
RealValue any
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.