envparse

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package envparse provides a way to parse environment variables from a struct

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSpecification = errors.New("specification must be a struct pointer")

ErrInvalidSpecification indicates that a specification is of the wrong type.

Functions

This section is empty.

Types

type Config

type Config struct {
	// FieldTagName is the name of the struct tag to use for the field name
	FieldTagName string
	// Skipper is the value of the tag to skip parsing of the field
	Skipper string
}

func (Config) GatherEnvInfo

func (c Config) GatherEnvInfo(prefix string, spec interface{}) ([]varInfo, error)

GatherEnvInfo gathers information about the specified struct, including defaults and environment variable names.

Jump to

Keyboard shortcuts

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