cmd/compile, cmd/link: encode cgo directives using JSON
The standard library has plenty of polished encoder/decoder implementations. No need for another ad-hoc one. I considered using encoding/gob instead, but these strings go into the package data part of the object file, so it's important they don't contain "\n$$\n". Package json escapes newlines in strings, so it's safe to use here. Change-Id: I998655524ccee7365c2c8e9a843e6975e95a3e62 Reviewed-on: https://go-review.googlesource.com/106463 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please
register
or
sign in
to comment