Closed leopku closed 3 weeks ago
https://github.com/leopku/kodtest/blob/master/cmd/demo3.go
type IStore interface { Get(string) any Set(string, any) error } type MemoryStore struct { kod.Implements[...] <-- } func (MemoryStore) Get(string) any { fmt.Println("dummy get called") return "dummy string" } func (MemoryStore) Set(string, any) error { fmt.Println("dummy set called") return nil } type DiskStore struct { kod.Implements[...] <-- } func (DiskStore) Get(string) any { fmt.Println("dummy get called") return "dummy string" } func (DiskStore) Set(string, any) error { fmt.Println("dummy set called") return nil }
It is not supported yet, which would make things complicated. But I'm open to this.
Thanks.
Close this issue at this moment, feel free to reopen when someone want to contribute this feature.
https://github.com/leopku/kodtest/blob/master/cmd/demo3.go