[go-nuts] Re: database/sql, p/pg, BLOB

2018-03-12 Thread shivani567
I am facing the same issue. We’re you ever able to get it resolved. -- 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

[go-nuts] Are you doing unit, module, and systems tests? If not, why not?

2018-03-12 Thread mrcrilly
I'm keen to understand if and how people are doing unit, module, and system tests for their Go applications. I've noticed the testing camp is split three ways: some people hate tests, some people don't get them or struggle with them, and some people love them. What are your thoughts? If you

[go-nuts] Re: x509.ParseECPrivateKey cannot parse ECDSA (256-bit curve) keys generated using openssl ecparams

2018-03-12 Thread me
I wanted to say that this is the correct answer and helped me a lot. On Wednesday, April 27, 2016 at 12:05:56 PM UTC+10, as wrote: > > Openssl is generating a koblitz curve. Golang supports the standard FIPS > curves. Try replacing secp256k1 with prime256v1. -- You received this message because

[go-nuts] Why should i use interface composistion

2018-03-12 Thread 'Reinhard Luediger' via golang-nuts
Dear all, as far as I know it is recommended to keep actual interfaces as small as possible and to form bigger interfaces via interface composiston. Would be great if the community could advise me what the real benefits are. Lets say i want to create an interface for the database backend like t

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 ar

[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 mess

[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 r

[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 https://gr

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 please put the vtable consideration aside, and se

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: > > https://play.golang.org/p/ctkwGuYGqiy > > In the examp

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 on golang.org does no

[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 ("Buu

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 JS

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 JS

[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 f

[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, asyncp...@gmail.com

[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 http.Respo

[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 gjson

[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 outdated.

[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 golang-n

[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 authentification

[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

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: >