DistSynth / fastvars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fastvars

GoDoc

fastvars is fasttemplate wrapper with dictionary substitusion ability.

Usage

fv, err := NewFastVars()
if err != nil {
    log.Fatal("NewFastVars() failed")
}
fv.Append(map[string]interface{}{
	"IP":   "127.0.0.1",
	"PORT": 80,
	"URL":  "http://#{IP}:#{PORT}/",
})
fmt.Println(fv.Get("URL"))
//returns http://127.0.0.1:80/

About

License:MIT License


Languages

Language:Go 100.0%