Re:Lies we tell ourselves to keep using Golang
by zgiber on Tuesday November 26, 2024 @05:31AM
(#42244411)
That should not be an issue, unless the code is written in notepad.
As for interfaces, a better approach is to return struct and accept interface in your functions wherever it is possible.
Too often I see code like "xyz := pkg1.SomeFunc(a, b, c)" that makes xyz's type non-evident, especially when interfaces are involved.
Please write Go code like
My 0.02€, YMMV.