Using the following command line where persister contains files generated by sqlc, the latest version in master generates invalid code for results that are references, e.g. map, slice, and pointers.
This PR aims to fix that — which appear to be that the original fix for #12 was incomplete, and this PR assumes PR #65 has been committed.
Using the following command line where
persister
contains files generated by sqlc, the latest version in master generates invalid code for results that are references, e.g. map, slice, and pointers.This PR aims to fix that — which appear to be that the original fix for #12 was incomplete, and this PR assumes PR #65 has been committed.
Here is the test code I wrote against:
Without the PR it generates this (and some newlines I removed), which fails to compile in Go:
With the PR, it generates this, also minus newlines, which does compile in Go: