eminetto / clean-architecture-go-v2

Clean Architecture sample
1.28k stars 229 forks source link

Inmem delete() function should consider using delete(r.m, id) #20

Open tonyhsuclrous opened 1 year ago

tonyhsuclrous commented 1 year ago

Below map item will still appear in the Inmem list() function.

r.m[id] = nil

https://github.com/eminetto/clean-architecture-go-v2/blob/master/usecase/book/inmem.go#L71

Removing a map item as shown below should be considered.

delete(r.m, id)