envconv

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrToMap

func ArrToMap(a []string) map[string]string

ArrToMap takes an environment array of the form

["KEY1=val1", "KEY2=val2"]

and returns a corresponding map of the form

{
	"KEY1": "val1",
	"KEY2": "val2"
}

func MapToArr

func MapToArr(m map[string]string) []string

MapToArr takes an map of the form

{
	"KEY1": "val1",
	"KEY2": "val2"
}

and returns a corresponding array of the form

["KEY1=val1", "KEY2=val2"].

func ToMap

func ToMap(ss ...string) map[string]string

ToMap is a convenience function wrapping ArrToMap. It takes an environment array of the form

["KEY1=val1", "KEY2=val2"]

and returns a corresponding map of the form

{
	"KEY1": "val1",
	"KEY2": "val2"
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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