env

package
v0.0.0-...-e1fd696 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package env for interacting with a .env file

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DotFile

type DotFile string

DotFile representation of a .env file

func DotFileForDirectory

func DotFileForDirectory(directory string) DotFile

DotFileForDirectory returns a dotFIle for the given directory

func (DotFile) Delete

func (f DotFile) Delete(name string)

Delete a value from the env

func (DotFile) EnsureExists

func (f DotFile) EnsureExists()

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

func (DotFile) Get

func (f DotFile) Get(name string) string

Get a value from the env

func (DotFile) Has

func (f DotFile) Has(name string) bool

Has a value in the env

func (DotFile) List

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

List all values from the env

func (DotFile) Missing

func (f DotFile) Missing(name string) bool

Missing a value in the env

func (DotFile) Path

func (f DotFile) Path() string

Path the path of the .env file

func (DotFile) Set

func (f DotFile) 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