Re: [go-nuts] glr support in goyacc?

2018-03-12 Thread David Wahlstedt
There are people working on it. This for instance: https://github.com/chemikadze/asn1go Furthermore, if you want to write telecom applications in go(where ASN.1 is common), it is quite natural to want an ASN.1 parser. BR, David Den fredag 9 mars 2018 kl. 14:47:59 UTC+1 skrev Ian Lance Taylor:

Re: [go-nuts] infinite recursion in method lookup due to recursive embedded interface value: any way to statically catch this?

2018-03-12 Thread roger peppe
On 12 March 2018 at 17:53, Maverick Woo wrote: > Hi, > > I am exploring a pattern to achieve a desirable aspect of vtable in Go. For > now please put the vtable consideration aside, and see an example I have put > together for this post: > >

Re: [go-nuts] infinite recursion in method lookup due to recursive embedded interface value: any way to statically catch this?

2018-03-12 Thread roger peppe
PS kudos for including a go.mod file in that demo code! On 12 March 2018 at 19:15, roger peppe wrote: > On 12 March 2018 at 17:53, Maverick Woo wrote: >> Hi, >> >> I am exploring a pattern to achieve a desirable aspect of vtable in Go. For >> now

[go-nuts] How can I pass path variable in the remote api using Go Language?

2018-03-12 Thread sairam . javawork
package main import ( "fmt" "log" "net/http" "github.com/gorilla/mux" ) func main() { router := mux.NewRouter().StrictSlash(true) router.HandleFunc("/todos/{todoId}", getCallHistory) log.Fatal(http.ListenAndServe(":8080", router)) } func GetcallHistory(w

[go-nuts] Re: mysql replication handling in go

2018-03-12 Thread anthony . hartanto
https://github.com/ahartanto/morphling On Tuesday, 12 May 2015 21:04:21 UTC+7, Sathish VJ wrote: > > I'm doing some research on mysql replication. How does my go code change > to handle that? > > Right now I'm connecting to the server once for the entire app. Will that > have to change in any

[go-nuts] How to achive that moby sends the portainer authentification with every call?

2018-03-12 Thread th . he . 1906
I am trying to automate the update of docker-compose.yml files with a go program in a secure way by using the authentification of portainer. Is there any chance you could help me figure out how to achive that whenever I make a call with moby the

[go-nuts] https://golang.org/pkg/crypto/tls/#example_Dial does not work

2018-03-12 Thread Chokchai Phatharamalai
Repro steps: 1. visit https://golang.org/pkg/crypto/tls/#example_Dial 2. press Run observed: panic: failed to connect: dial tcp: Protocol not available goroutine 1 [running]: main.main() /tmp/sandbox548532523/main.go:50 +0x2e0 expected: no errors I guessed the certificate is

[go-nuts] Is there anyone using gomobile in production ?

2018-03-12 Thread serdar . irmak
Thank you for your answer Ged. Issues like this one worries me https://github.com/golang/go/issues/22395 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[go-nuts] Struct confusion... what am I missing?

2018-03-12 Thread asyncpimaker
Go Noob here, confused about struct. My result is type []gjson.Result but I can't extract a named value from this struct. Help greatly appreciated, I have tried several articles. package main import ( "fmt" "github.com/tidwall/gjson" "reflect" ) func main() { // JSON package

[go-nuts] infinite recursion in method lookup due to recursive embedded interface value: any way to statically catch this?

2018-03-12 Thread Maverick Woo
Hi, I am exploring a pattern to achieve a desirable aspect of vtable in Go. For now please put the vtable consideration aside, and see an example I have put together for this post: https://play.golang.org/p/ctkwGuYGqiy In the example, there is a "typo" in the spelling of a method name

Re: [go-nuts] https://golang.org/pkg/crypto/tls/#example_Dial does not work

2018-03-12 Thread Ian Lance Taylor
On Sun, Mar 11, 2018 at 10:10 PM, Chokchai Phatharamalai wrote: > > Repro steps: > 1. visit https://golang.org/pkg/crypto/tls/#example_Dial > 2. press Run > > observed: > > panic: failed to connect: dial tcp: Protocol not available The sandbox used to execute examples hosted

Re: [go-nuts] Struct confusion... what am I missing?

2018-03-12 Thread roger peppe
jake6502 is correct - the result is a slice that needs to be indexed (you might use jsonvals[2].Int()). I'd suggest that instead of using that gjson package, you might consider using the standard library's encoding/json package, which enables you to define a struct type that mimics the expected

Re: [go-nuts] Struct confusion... what am I missing?

2018-03-12 Thread roger peppe
jake6502 is correct - the result is a slice that needs to be indexed (you might use jsonvals[2].Int()). I'd suggest that instead of using that gjson package, you might consider using the standard library's encoding/json package, which enables you to define a struct type that mimics the expected

[go-nuts] Re: Struct confusion... what am I missing?

2018-03-12 Thread jake6502
I have not run this. But based on your comments, jsonvals is a slice. So you would presumably need to check the length then access a specific item in the slice like this: fmt.Printf("\n%+v\n", jsonvals[0].ID) Hope that helps. On Monday, March 12, 2018 at 12:01:33 PM UTC-4,

[go-nuts] Re: Struct confusion... what am I missing?

2018-03-12 Thread jake6502
Ok, so I looked at the https://github.com/tidwall/gjson/blob/master/gjson.go code, and see that the jsonvals slice is a slice of: type Result struct { // Type is the json type Type Type // Raw is the raw json Raw string // Str is the json string Str string // Num is the json number Num

[go-nuts] rmq: use R from Go, Go from R

2018-03-12 Thread Jason E. Aten
package `rmq` for R "R messaging and Queuing" provides for R and Golang embedding (both ways). Includes a gorilla-based websocket server for providing R functions... to anybody. Efficient msgpack based communication. https://github.com/glycerine/rmq Enjoy, Jason -- You received this

Re: [go-nuts] cumulative Chi square probability density function

2018-03-12 Thread Dan Kortschak
Gonum stat/distuv has this. https://godoc.org/gonum.org/v1/gonum/stat/distuv#ChiSquared On Mon, 2018-03-12 at 16:01 -0700, Kees Varekamp wrote: > Hello Gophers, > > Does anyone happen to have some Go code for the cumulative Chi > square  > probability density function lying around?  > > Thanks

[go-nuts] Re: cumulative Chi square probability density function

2018-03-12 Thread Jason E. Aten
On Monday, March 12, 2018 at 6:02:10 PM UTC-5, Kees Varekamp wrote: > > Does anyone happen to have some Go code for the cumulative Chi square > probability density function lying around? > https://github.com/glycerine/gostat/blob/master/chisq.go#L9 -- You received this message because you

[go-nuts] cumulative Chi square probability density function

2018-03-12 Thread Kees Varekamp
Hello Gophers, Does anyone happen to have some Go code for the cumulative Chi square probability density function lying around? Thanks in advance, Kees -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] ANN: gemacs, a lightweight emacs, written in pure Go

2018-03-12 Thread Jason E. Aten
*https://github.com/glycerine/gemacs* -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit