Go 1.6 is more restrict about passing pointers to cgo.
golang/go#12416
Passing a pointer to go pointer causes the following panic in iconv-go:
runtime.errorString: runtime error: cgo argument has Go pointer to Go pointer
File "runtime/panic.go", line 426, in gopanic
reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
File "runtime/cgocall.go", line 499, in cgoCheckArg
panic(errorString(msg))
File "runtime/cgocall.go", line 373, in cgoCheckPointer
cgoCheckArg(pt.elem, p, true, false, cgoCheckPointerFail)
File "github.com/djimenez/iconv-go/converter.go", line 83, in Convert
_, err = C.iconv(this.context, &inputPointer, &inputLeft, &outputPointer, &outputLeft)
File "github.com/djimenez/iconv-go/converter.go", line 123, in ConvertString
bytesRead, bytesWritten, err = this.Convert(inputBuffer[totalBytesRead:], outputBuffer[totalBytesWritten:])
Go 1.6 is more restrict about passing pointers to cgo. golang/go#12416
Passing a pointer to go pointer causes the following panic in iconv-go:
runtime.errorString: runtime error: cgo argument has Go pointer to Go pointer File "runtime/panic.go", line 426, in gopanic reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz)) File "runtime/cgocall.go", line 499, in cgoCheckArg panic(errorString(msg)) File "runtime/cgocall.go", line 373, in cgoCheckPointer cgoCheckArg(pt.elem, p, true, false, cgoCheckPointerFail) File "github.com/djimenez/iconv-go/converter.go", line 83, in Convert _, err = C.iconv(this.context, &inputPointer, &inputLeft, &outputPointer, &outputLeft) File "github.com/djimenez/iconv-go/converter.go", line 123, in ConvertString bytesRead, bytesWritten, err = this.Convert(inputBuffer[totalBytesRead:], outputBuffer[totalBytesWritten:])