execenv

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package execenv contains logic for generating execution environing using a plugin's exec-env callback script if available.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentEnv

func CurrentEnv() map[string]string

CurrentEnv returns the current environment as a map

func Generate

func Generate(plugin plugins.Plugin, callbackEnv map[string]string) (env map[string]string, err error)

Generate runs exec-env callback if available and captures the environment variables it sets. It then parses them and returns them as a map.

func MergeEnv

func MergeEnv(map1, map2 map[string]string) map[string]string

MergeEnv takes two maps with string keys and values and merges them.

func SliceToMap

func SliceToMap(env []string) map[string]string

SliceToMap converts an env map to env slice suitable for syscall.Exec

Types

This section is empty.

Jump to

Keyboard shortcuts

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