nolink
Am facing troubles continuing my contribution to an open source and I’II like your help.
Problem:
Am upgrading a library that used the deprecated protobuf to use the new one. If you’ve used the library before you’ll notice the new lib has some of it struct with field that as a
DoNotCopy mutex •[O]sync.Mutex•
The lib am upgrading is not concerned with whether the struct is copied or not… in-fact it does copies it and the logic around the codebase accounts for it but “Go vet” is the problem.
Complains of a copylocks.
The obvious solution Is to pass a pointer to the struct, in the case is in a channel, and doing that would break
function signatures,
type declarations and
interfaces definition
to account for the pointers.
I don’t know if there is a way to suppress or maneuver around this. The “go vet” complaint are always on function arguments or return values, if you’ll need me clarifying more… I’ll be here.