Hello World!

package main

import "fmt"

type Greeter interface {
	Greet() string
}

type Dutch struct{}
type English struct{}

func main() {
	greeters := []Greeter{
		Dutch{},
		English{},
	}

	for _, g := range greeters {
		sayHello(g)
	}
}

func sayHello(g Greeter) {
	fmt.Println(g.Greet())
}

func (d Dutch) Greet() string {
	return "Hallo Wereld!"
}

func (e English) Greet() string {
	return "Hello World!"
}