© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Olex Khonko
actually why do you use pointer of slice
slice is a pointer itself. So you just work with pointer on pointer.
Instead you can improve you code and stop doint this crazy pointer on slice. And it would be much more better
TotallyGamerJet
I like programming in Go and doing things with it I probably shouldn't.
The database column is nullable so the DTO is a pointer to properly represent that. The strategy discussed in this post is useful in other areas too. For example, an email type which can have stronger guarantees than a plain string.