expand

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package expand implements helpers to expand shell-style variables within config files before they are parsed

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBytes

func FromBytes(b []byte, getEnv func(string) string) (string, error)

FromBytes consumes a byte array and expands shell-style variable within it. os.GetEnv will be used unless a custom mapper is provided

func FromFile

func FromFile(filename string, getEnv func(string) string) (string, error)

FromFile reads a file and expands shell-style variable within it. os.GetEnv will be used unless a custom mapper is provided

func FromReader

func FromReader(f io.Reader, getEnv func(string) string) (string, error)

FromReader consumes a io.Reader and expands shell-style variable within it. os.GetEnv will be used unless a custom mapper is provided

func FromString

func FromString(s string, getEnv func(string) string) (string, error)

FromString consumes a string and expands shell-style variable within it. os.GetEnv will be used unless a custom mapper is provided

Types

This section is empty.

Jump to

Keyboard shortcuts

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