Since go did not support generic yet ,
Generate give us a alternative choice .
However, although I read the official document.
I still don't know how to use go generate to generate code.
Could anyone show us an example ?
Let's take std::min in c++ us an example.
min(x,y) // type could
On Sat, Jan 21, 2017 at 4:07 PM, James Aguilar wrote:
> If you don't know or care about pagers and process management, you can stop
> reading now.
>
> Background: I have a program that compile my code each time I modify it. It
> produces logs continuously on a terminal.
>
Hi guys, I hope I'm posting this in the appropiate forum. It's difficult to
find this kind of go-gl documentation.
I'm new to golang, but I'm experienced with OpenGL, usually through java
wrappers. I'm using go-gl to access OpenGL through Go. I'm on a windows 10,
64-bit
For go-gl
Thanks Chris!
I'll go through the documentation to understand this new approach.
Pablo
On Mon, Jan 23, 2017 at 12:19 PM, Chris Lu wrote:
> Thanks! This page has a little more details.
>
> https://github.com/chrislusf/gleam/wiki/Write-Mapper-Reducer-in-Go
>
> LuaJIT is fast.
Thanks! This page has a little more details.
https://github.com/chrislusf/gleam/wiki/Write-Mapper-Reducer-in-Go
LuaJIT is fast. But Go code is more manageable and can have more
complicated logic with libraries. Sacrificing the readability with extra
type casting from interface{} seems a small
Note that you can't use lowercase struct field names with encoding/json
anyway, because fields must be exported for encoding/json to see them, and
fields are exported by starting them with an uppercase letter. So if you
want the JSON field names to be lower case, you have to use struct tags. I
TL;DR; use struct tags to specify marshal/unmarsal names.
type LoginRequest struct {
User string `json:"username"`
Passw string `json:"password"`
}
...
SetBody(struct {
Type string `json:"type"`
LoginRequest
}{
Type: "LoginRequest", LoginRequest:{User:"my_admin", Passw:"testing123"}})
Below is a snippet of my code. I need to pass a json body that has a field
name "type" in it. I can create the body as a string, but I was trying to
leverage structs. Obviously, trying to create a variable named 'type' in
the struct throws errors. As "type" as a field name is common in json, I
Hello,
On Tuesday, January 3, 2017 at 11:19:12 PM UTC-7, Tarmigan wrote:
>
> Hi Chris,
>
> I think that the parsing of the runtime trace information like you are
> describing is very interesting. I have been thinking about a similar
> continuous tracing and automatic anomaly detection for my
Hello, thanks for the response, excuse the late reply here got a bit busy
over the holidays.
On Wednesday, January 4, 2017 at 2:22:36 AM UTC-7, Dmitry Vyukov wrote:
>
> Streaming stacks and strings sounds fine to me. I don't see any
> potential issues here.
>
Awesome, I think this alone would
10 matches
Mail list logo