예제 #1
0
func ExampleMaybeHug_second() {
	cutieWantingHug := LovelyCutie{
		wantsHug: true,
	}
	fmt.Println(maybehugs.MaybeHug(cutieWantingHug))
	// Output: Hug!
}
예제 #2
0
func ExampleMaybeHug() {
	cutieNotWantingHug := LovelyCutie{
		wantsHug: false,
	}
	fmt.Println(maybehugs.MaybeHug(cutieNotWantingHug))
	// Output: Empathy!
}