Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
/ varexpand Public archive
generated from bep/golibtemplate

Replaces ${var} with value from a mapping function.

License

Notifications You must be signed in to change notification settings

bep/varexpand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests on Linux, MacOS and Windows Go Report Card GoDoc

This library has one Go func, Expand, which is similar to os.Expand – with one major difference: It only considers ${var}.

This may sound limiting, but os.Expand has lots of situations where it breaks, e.g. regular expressions.

Note that this implementation may also be slower than the stdlib variant (I will eventually add some benchmarks), so don't use it on William Shakespeare's complete works.

About

Replaces ${var} with value from a mapping function.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages