Skip to content
/ dotenv Public

Parse configuration files for key value pairs, simple implementation.

Notifications You must be signed in to change notification settings

bingxio/dotenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotenv

A Go language parsing tool for key value pair configuration files.

Used in configuration file parsing of back-end small applications. Only the following features are supported, please consider using them.

grammar

This tool parses by line, where one line can be a key value, a comment, or a blank line.

_id=20
name = "Kate"
# Comment
  • Keys can be uppercase and lowercase English letters and underscores.
  • The equal sign cannot be missing.
  • Values are parsed as strings by default, and single and double quotes are automatically ignored.

value types

Structure unmarshalling of the following value types is supported.

string
int     | int8    | int16  | int32  | int64
uint    | uint8   | uint16 | uint32 | uint64
float32 | float64

install

go get github.com/bingxio/dotenv

example

See: parser_test.go

About

Parse configuration files for key value pairs, simple implementation.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages