envfile

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package envfile provides parsing for .env files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvVar

type EnvVar struct {
	Key      string
	Value    string
	Line     int
	HasValue bool
	Comment  string
	Quoted   bool
}

EnvVar represents a single environment variable parsed from a .env file.

func Parse

func Parse(path string) ([]EnvVar, error)

Parse reads and parses a .env file, returning the list of environment variables.

func ParseReader

func ParseReader(scanner *bufio.Scanner) ([]EnvVar, error)

ParseReader parses env vars from a scanner.

func ParseString

func ParseString(content string) ([]EnvVar, error)

ParseString parses env vars from a string.

Jump to

Keyboard shortcuts

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