dotenv

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

README

dotenv

Simple .env file interaction for Go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File string

File location of the .env file to work on.

func FileForDirectory

func FileForDirectory(directory string) File

FileForDirectory returns the File for the given directory.

func (File) Delete

func (f File) Delete(name string)

Delete a value from the env.

func (File) EnsureExists

func (f File) EnsureExists()

EnsureExists ensures that the File exists, creating an empty one if not.

func (File) Get

func (f File) Get(name string) string

Get a value from the env.

func (File) Has

func (f File) Has(name string) bool

Has a value in the env.

func (File) List

func (f File) List() map[string]string

List all values from the env.

func (File) Missing

func (f File) Missing(name string) bool

Missing a value in the env.

func (File) Path

func (f File) Path() string

Path the path of the .env file.

func (File) Set

func (f File) Set(name string, value string)

Set a value in the env.

Jump to

Keyboard shortcuts

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