Re: [go-nuts] [generics] Embedding interfaces

2021-05-08 Thread Viet Nguyen
Awesome. Thanks muchly On Sat, May 8, 2021 at 11:40 PM Ian Lance Taylor wrote: > > On Fri, May 7, 2021 at 11:08 AM Viet Nguyen wrote: > > > > I'm trying to convert this code to use generics: > > > > type Cache interface { > > GetIfPresent(interface{}) (interface{}, bool) > > } > > > > type Loadi

Re: [go-nuts] [generics] Embedding interfaces

2021-05-08 Thread Ian Lance Taylor
On Fri, May 7, 2021 at 11:08 AM Viet Nguyen wrote: > > I'm trying to convert this code to use generics: > > type Cache interface { > GetIfPresent(interface{}) (interface{}, bool) > } > > type LoadingCache interface { > Cache > Get(interface{}) (interface{}, error) > } > > However, I couldn't find