dotenv

package
v0.5.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: PostgreSQL Imports: 8 Imported by: 0

Documentation

Overview

Package dotenv sets one variable in a .env file, leaving every other line as it was.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(path, name, value string) error

Set writes name=value into path. The last line assigning name is replaced, since the last assignment is the one every loader keeps; with none, the line is appended. A new file is created at 0600, and an existing file keeps its mode. A symbolic link is refused: the file receives a live password, and a planted link would send it elsewhere.

func ValidName

func ValidName(name string) bool

ValidName reports whether name can be a variable in a .env file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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