Skip to content

Commit

Permalink
Update Test Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
fallsimply committed Mar 16, 2020
1 parent bca2c15 commit eb3dbe0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bilet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestPopulate(t *testing.T) {
}
}

func ExamplePopulate() {
func ExampleTmpl_Populate() {
Debug = true
tmpl := Template("Hello, I'm {{name}} from ${City}, {{from_state}}")
str := tmpl.Populate(map[string]string{
Expand All @@ -41,6 +41,14 @@ func ExamplePopulate() {
// Output: Hello, I'm John from Dallas, TX
}

func ExampleTmpl_Pull() {
Debug = true
tmpl := Template("Hello, I'm {{name}} from ${City}, {{from_state}}")
str := tmpl.Pull("Hello, I'm John from Dallas, TX")
fmt.Print(str)
// Output: map[City:Dallas from_state:TX name:John]
}

func TestMakePullRegex(t *testing.T) {
Debug = true
fmt.Println(testTemplate.template)
Expand Down

0 comments on commit eb3dbe0

Please sign in to comment.