On Tue, Nov 19, 2019 at 7:17 AM Vishnu <
vishn...@gmail.com> wrote:
>
> Sorry. Yes, I was trying to modify the code to see if the error goes away.
>
> type swig_gostring struct { p uintptr; n int }
> func swigCopyString(s string) string {
> p := *(*swig_gostring)(unsafe.Pointer(&s))
> r := string((*[0x7fffffff]byte)(unsafe.Pointer(p.p))[:p.n]) // This line gives the go vet error: possible misuse of unsafe.Pointer
> Swig_free(p.p)
> return r
> }
>
>
> How do I exclude the file from going through go vet. I tried putting the below header in the file but didn't help
>
> // Code generated by swig. DO NOT EDIT.
directory and letting the go tool invoke SWIG directly. If you do
code. Are you invoking SWIG yourself and committing the resulting