Rename "String" type to "OptString"

This commit is contained in:
Geoff Hickey
2017-11-16 14:36:31 -05:00
parent b59e9d42f4
commit 96763e5316
3 changed files with 110 additions and 107 deletions

View File

@@ -22,7 +22,6 @@ import (
"github.com/digitalocean/go-libvirt/internal/lvgen"
)
// TODO: make these an argument
const protoPath = "src/remote/remote_protocol.x"
func main() {

View File

@@ -82,6 +82,10 @@ var goEquivTypes = map[string]string{
// requires us to ditch the typedef that would otherwise be generated.
"NonnullString": "string",
// remote_string gets renamed "String" by the generator, so here we'll
// rename that to OptString - these are optional strings, and can be "null".
"String": "OptString",
// TODO: Get rid of these. They're only needed because we lose information
// that the parser has (the parser knows it has emitted a go type), and then
// we capitalize types to make them public.