Skip to content
Advertisement

Implement Scan and Value functions in golang

I am trying to store some golang objects in SQL database and have implemented the scanner and value interface as follows:

Is there a way that I can pass the parameter to the Value() function by pointers, as I am getting a HugeParam error that the attr passed to the Value() function is too big, when trying to convert the data back to my struct.

Any advise is appreciated, thanks!

Update: I am trying to solve this issue by marking a nolint to ignore the huge param but the error still persists. This is the error msg:

Advertisement

Answer

Fix:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement