3 ms·
func example(x interface{f() string; g() string}) string { } Go's structural typing is based on methods instead of fields, but it's structural typing as well.
by mseepgood 10y ago
func example(x interface{f() string; g() string}) string {
}
Go's structural typing is based on methods instead of fields, but it's structural typing as well.