Commits

Ross Light committed 50acdc4

Add template cycle example

  • Participants
  • Parent commits 6ca1470

Comments (0)

Files changed (1)

File template_test.go

+package webapp
+
+import (
+	"fmt"
+)
+
+func ExampleCycle() {
+	for i := 0; i < 3; i++ {
+		fmt.Println(Cycle(i, "even", "odd"))
+	}
+
+	// Output:
+	// even
+	// odd
+	// even
+}