Try something like this: https://play.golang.org/p/hcI8eMo08Wx
Your array type needs to be an interface type to allow the different
value types.
On Sat, 2020-01-18 at 12:30 -0800, ramkill...@hotmail.com wrote:
> I have a server that requires data to be sent back that looks like
> this
>
>
On Sat, Jan 18, 2020 at 10:28 PM wrote:
>
> I have a server that requires data to be sent back that looks like this
>
> {"jsonrpc": "2.0", "result": [false, "", "", ""], "id": 1}
https://play.golang.org/p/WYrvolLytd9
Use a []interface{} for "result".
>
> Using json Encoder and Json
Hey Gophers,
I've just published the first part in a series of tutorials on writing your
own Tetris clone. You can find it here:
https://rocketnine.space/post/tetris-1/
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
I have a server that requires data to be sent back that looks like this
{"jsonrpc": "2.0", "result": [false, "", "", ""], "id": 1}
Using json Encoder and Json Marshalling, the closes I have come up with is
{
"id": 1,
"jsonrpc": "2.0",
"result": "[false,\"\",\"\",\"\"]"
}
Is this
Hi! I have one repo with multiple packages. For each package i have
dedicated go.mod (this is a requirement because repo is collection of
plugins with many deps).
How to run test for all of them? go test ./... does not run tests for
sub modules. Now i have very ugly thing:
find . -name 'go.mod' ,
Thank you for the pointers. I will dig more into them.
Thanks,
Prabhu
On Sat, Jan 18, 2020 at 12:10 PM Tamás Gulácsi wrote:
> Start simple: use a *bytes.Buffer, and help the GC with using a sync.Pool
> for those buffers.
>
> --
> You received this message because you are subscribed to the