envify

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 9 Imported by: 0

README

envify

.env Loader

Getting started

Getting envify

With Go module support, simply add the following import

import "github.com/mr-kmh/envify"

to your code, and then go [build|run|test] will automatically fetch the necessary dependencies.

Run the following command to install the envify package

$ go get -u github.com/mr-kmh/envify
Running envify
package main

import (
	"fmt"
	"os"

	"github.com/mr-kmh/envify"
)

func init() {
	envify.Load()
}

func main() {
	fmt.Println(os.Getenv("VARIABLE"))
}

Use Go command to run the demo:

$ go run example.go

Documentation

Index

Constants

View Source
const (
	COMMENTPREFIX = "#"
	SEPARATOR     = "="
)

Variables

This section is empty.

Functions

func Load

func Load()

Types

type Text added in v0.1.3

type Text interface {
	[]byte | string
}

Jump to

Keyboard shortcuts

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