csstring

package
v1.5.0-rc6 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StrictExpand

func StrictExpand(s string, mapping func(string) (string, bool)) string

StrictExpand replaces ${var} or $var in the string according to the mapping function, like os.Expand. The difference is that the mapping function returns a boolean indicating whether the variable was found. If the variable was not found, the string is not modified.

Whereas os.ExpandEnv uses os.Getenv, here we can use os.LookupEnv to distinguish between an empty variable and an undefined one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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