Skip to content

Latest commit

 

History

History
34 lines (19 loc) · 316 Bytes

README.md

File metadata and controls

34 lines (19 loc) · 316 Bytes

goenv

autoload .env

example

package main

import (
	"fmt"

	env "github.com/xxiu/goenv"
	_ "github.com/xxiu/goenv/autoload"
)

func main() {

	db := env.Getenv("DB")
	fmt.Printf("db:%s \n", db)

    env.Load("file1","file2")

}

thank

Read file code form: https://github.com/joho/godotenv