(ctx context.Context, id int64, item *Item)
| 23 | } |
| 24 | |
| 25 | func (e *Example) Set(ctx context.Context, id int64, item *Item) error { |
| 26 | // enable write to new storage |
| 27 | // ... |
| 28 | |
| 29 | if err := e.storeV1.Set(ctx, id, item); err != nil { |
| 30 | return fmt.Errorf("failed to store item: %w", err) |
| 31 | } |
| 32 | |
| 33 | return nil |
| 34 | } |
| 35 | |
| 36 | func (e *Example) Get(ctx context.Context, id int64) (*Item, error) { |
| 37 | var item Item |