any) any } type MyConverter struct{} func (m *MyConverter) Convert[T, U any](input T) U { /* ... */ } var conv Converter = &MyConverter{} // コンパイルエラー // エラー文 // *MyConverter does not implement Converter // have Convert[T, U any](T) U // want Convert(any) any 7
} type User struct { Email // 埋め込みフィールド Name string } // Go 1.26: 埋め込み型を経由 user := User{Email: Email{Address: "[email protected]"}, Name: "Alice"} // Go 1.27: 直接指定 user := User{Address: "[email protected]", Name: "Alice"} 8