Example #1
0
// Test the provided listfunc1 template with list0 data
func ExampleGenerate2_listfunc1List0() {
	// Equivalent testing on commandline:
	//   easygen -tf test/listfunc1 test/list0
	fmt.Print(easygen.Generate2(false, "test/listfunc1", "test/list0"))
	// Output:
	// red, blue, white.
}
Example #2
0
// Test Env variable with list0 data
func ExampleList0_Env() {
	// Equivalent testing on commandline:
	//   easygen -tf test/list0E test/list0
	fmt.Println(os.Getenv("SHELL"))
	fmt.Print(easygen.Generate2(false, "test/list0E", "test/list0"))
	// Output:
	// /bin/bash
	// The colors are: red, blue, white, .
	// The system shell is: /bin/bash
	// Different shells are: /bin/bash-red, /bin/bash-blue, /bin/bash-white,
}