[go-nuts] Re: go1.12.16 not tagged on release-branch.go1.12?

2020-01-29 Thread peterGo
Steve, "I don't see" Please provide reproducible errors. For example, [security] Go 1.13.7 and Go 1.12.16 are released https://groups.google.com/forum/#!topic/golang-nuts/4uVpv5Zfxvo ~$ git clone https://github.com/golang/go --depth 1 -b release-branch.go1.12 go1.12 Cloning into 'go1.12'...

Re: [go-nuts] Experience report on a large Python-to-Go translation

2020-01-29 Thread 'Axel Wagner' via golang-nuts
On Wed, Jan 29, 2020 at 12:57 PM Nigel Tao wrote: > For example, the https://golang.org/pkg/io/#LimitedReader struct just > exports its fields, and you use it like this > (https://go.googlesource.com/go/+/refs/heads/master/src/io/io_test.go#39). > There is no io.NewLimitedReader function. >

Re: [go-nuts] Re: go1.12.16 not tagged on release-branch.go1.12?

2020-01-29 Thread peterGo
Steve, "Your example reproduces the error. " Yes, I posted the error in reproducible form. The first step in fixing a bug. The Go team can confirm the bug and verify that their fix works. No guesswork required. Peter On Wednesday, January 29, 2020 at 8:41:48 AM UTC-5, Steve Mynott wrote: > >

Re: [go-nuts] Anomaly in RunCommand and the exit status of the child process

2020-01-29 Thread Ian Lance Taylor
On Wed, Jan 29, 2020 at 12:20 AM Subramanian Sridharan wrote: > > I'm in need of using the "script" command (more info about script in the end) > in Linux to run a couple of commands and get the exit status of the second > command. > > Here is my code snippet: > > package main > > > import ( >

[go-nuts] ActiveState Komodo IDE Now Free

2020-01-29 Thread JuciÊ Andrade
https://www.i-programmer.info/news/90-tools/13411-activestate-komodo-ide-now-free.html "There will no longer be a fee for Komodo, the multi-language IDE for Python, PHP, JavaScript, HTML5, CSS, Node.js, Golang, Ruby, Perl, and a variety of other languages and frameworks ... The only thing

[go-nuts] go1.12.16 not tagged on release-branch.go1.12?

2020-01-29 Thread Steve Mynott
I don't see go1.12.16 tagged on release-branch.go1.12? Is this expected? -- Steve Mynott cv25519/ECF8B611205B447E091246AF959E3D6197190DD5 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] Experience report on a large Python-to-Go translation

2020-01-29 Thread Nigel Tao
On Wed, Jan 29, 2020 at 11:05 PM Axel Wagner wrote: > On Wed, Jan 29, 2020 at 12:57 PM Nigel Tao wrote: >> For example, the https://golang.org/pkg/io/#LimitedReader struct just >> exports its fields, and you use it like this >>

Re: [go-nuts] Re: go1.12.16 not tagged on release-branch.go1.12?

2020-01-29 Thread Steve Mynott
Your example reproduces the error. I'd expect ./go version to return "go version go1.12.16 linux/amd64" since that's the latest version On 29/01/2020, peterGo wrote: > Steve, > > "I don't see" > > Please provide reproducible errors. For example, > > [security] Go 1.13.7 and Go 1.12.16 are

Re: [go-nuts] Experience report on a large Python-to-Go translation

2020-01-29 Thread Nigel Tao
Great write-up. > Keyword arguments should be added to the language. In idiomatic Go, we often use struct literals (together with "make the zero value useful", e.g. allocate map-typed fields lazily) instead of object-creation functions: x := { A: a, B: b.c(), } instead of x =

Re: [go-nuts] Re: Experience report on a large Python-to-Go translation

2020-01-29 Thread Nigel Tao
On Mon, Jan 27, 2020 at 3:23 PM Eric Raymond wrote: > Consider a parser in which your handler function for a given token or subtree > consists of a bunch of if/then returns, and not matching one of them means > you should throw upwards to an error handler. FWIW,

[go-nuts] forbid downloading package without go.mod enabling

2020-01-29 Thread Vasiliy Tolstov
I'm work on go-micro project and usually users try to use package inside GOPATH or without go module on. This breaks things, and users asks on github issue that nothing works. Is it possible to disallow getting package without go modules enabled? Or what is the best practice for this (mentioned in

Re: [go-nuts] Re: go1.12.16 not tagged on release-branch.go1.12?

2020-01-29 Thread Sue Spence
I saw a person asking a question, not submitting a bug. There was a certain something about your response, that fronted as helpful but didn't really come across that way. On Wednesday, 29 January 2020 13:55:48 UTC, peterGo wrote: > > Steve, > > "Your example reproduces the error. " > > Yes, I

Re: [go-nuts] Cgo fixed length array woes

2020-01-29 Thread mark mellar
Thanks Ian! My C's a bit rusty, I'd expected I'd have to explicitly allocate some memory for rLimits, similar to askedHosts, turns out that isn't required after all and your suggestion of setting element by element is working like a charm! Thanks again, Mark On Tuesday, January 28, 2020 at

[go-nuts] [Proposal] Change how gofmt formats struct fields

2020-01-29 Thread Manlio Perillo
This is a proposal for the next version Go. Currently gofmt formats struct fields to make the field name and type aligned. However this may cause extra changes in a commit diff when one field is added or removed. What I propose is to use a tab between the field name and type. It is

[go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-01-29 Thread Amnon Baron Cohen
On Wednesday, 29 January 2020 17:56:35 UTC, Manlio Perillo wrote: > > Is this reasonable? > > Not really, as it would generate many gratuitous changes to existing code. This is one thing gofmt avoids. -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Re: go1.12.16 not tagged on release-branch.go1.12?

2020-01-29 Thread Tyler Compton
I think it's very reasonable to ask a simple Git workflow question on golang-nuts without having to provide reproduction steps. Yes, I posted the error in reproducible form. The first step in fixing a > bug. The Go team can confirm the bug and verify that their fix works. No > guesswork required.

[go-nuts] annoing: runtime error: cgo argument has Go pointer to Go pointer

2020-01-29 Thread aotto1968zwei
Hi, I try to use a *C* library with *GO* and have a small problem passing a *GO* pointer through *C* into a *GO* callback. If I set: "*export GODEBUG=cgocheck=0*" everything works fine but without I get the error from above Detail: I want to pass "*argv*" through *C* back to *GO*, the lifetime

[go-nuts] Building Go Web Applications and Microservices Using Gin

2020-01-29 Thread Tomas Fernandez
[image: Building_Go_Web_Applications___Microservices_Using_Gin.png] https://semaphoreci.com/community/tutorials/building-go-web-applications-and-microservices-using-gin A comprehensive tutorial covering: - Go introduction - How to use the Gin framework to build an API and a Web

[go-nuts] Load function from golang.org/x/tools/go/packages throws "argument list too long" error

2020-01-29 Thread adam.welc via golang-nuts
I am trying to analyze a large application using Go's static analysis support. I am using the "packages" package to load all application packages using the Load function. Unfortunately

Re: [go-nuts] annoing: runtime error: cgo argument has Go pointer to Go pointer

2020-01-29 Thread Bruno Albuquerque
One way to work this around is to use https://github.com/mattn/go-pointer. On Wed, Jan 29, 2020 at 2:12 PM wrote: > Hi, > > I try to use a *C* library with *GO* and have a small problem passing a > *GO* pointer through *C* into a *GO* callback. > If I set: "*export GODEBUG=cgocheck=0*"

Re: [go-nuts] Why is go too slow?

2020-01-29 Thread Michael Jones
Following up on this, consider how long it actually takes to compute F(40) in the normal iterative way, single threaded -- this is the natural amount of work under discussion. iterative: BenchmarkFibonacci40-36 5197482821.9 ns/op 0 B/op 0 allocs/op 22 nanoseconds, about a

Re: [go-nuts] [Proposal] Change how gofmt formats struct fields

2020-01-29 Thread Wojciech S. Czarnecki
Dnia 2020-01-29, o godz. 09:56:35 Manlio Perillo napisał(a): > What I propose is to use a tab between the field name and type. > It is responsibility of the editor or html formatter to align the code. This ("between") assumes an agreed constant width of the tab representation. Ie. it will never

Re: [go-nuts] [Proposal] Change how gofmt formats struct fields

2020-01-29 Thread Dan Kortschak
I suspect Manlio was referring to something like this http://nickgravgaard.com/elastic-tabstops/. Dan On Thu, 2020-01-30 at 01:10 +0100, Wojciech S. Czarnecki wrote: > Dnia 2020-01-29, o godz. 09:56:35 > Manlio Perillo napisał(a): > > > What I propose is to use a tab between the field name

[go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-01-29 Thread Manlio Perillo
On Wednesday, January 29, 2020 at 8:38:56 PM UTC+1, Amnon Baron Cohen wrote: > > > > On Wednesday, 29 January 2020 17:56:35 UTC, Manlio Perillo wrote: >> >> Is this reasonable? >> >> > Not really, as it would generate many gratuitous changes to existing code. > This is one thing gofmt avoids. >

[go-nuts] Re: Experience report on a large Python-to-Go translation

2020-01-29 Thread Liam
That was a great read, thank you. Re throw/catch, this is one of the few Go2 error handling proposals still open, tho it hasn't yet seen substantive feedback from the Go team: https://github.com/golang/go/issues/27519 I'd suggest re-posting this on golang-dev; I almost missed it as I rarely

[go-nuts] Re: annoing: runtime error: cgo argument has Go pointer to Go pointer

2020-01-29 Thread Andreas Otto
Am Donnerstag, 30. Januar 2020 06:15:28 UTC+1 schrieb Tamás Gulácsi: > > What does "argv" hold? > > Can it be a concrete type, not an interface ? That would allow passing it > - or if you copy it to a C.malloc-ed array.. > > > *Argv* are the arguments of *Send* and many kind of types are are

[go-nuts] batch processing RESTful requests

2020-01-29 Thread Prabhu Chawandi
Hello, I am looking for information on how can I batch process REST API requests. I am having a server built using GO std library "net/http" and mongoDB being persistent storage. Do I need to create a separate endpoint to get this batch request and process in the handler? Or any other ways to

Re: [go-nuts] annoing: runtime error: cgo argument has Go pointer to Go pointer

2020-01-29 Thread Andreas Otto
Am Mittwoch, 29. Januar 2020 23:19:34 UTC+1 schrieb Bruno Albuquerque: > > One way to work this around is to use https://github.com/mattn/go-pointer. > > > thanks, but also use this kind of "*HASH based and export the hash handle*" solution. But I call this a "slow" solution, because of the

[go-nuts] Re: annoing: runtime error: cgo argument has Go pointer to Go pointer

2020-01-29 Thread Tamás Gulácsi
What does "argv" hold? Can it be a concrete type, not an interface ? That would allow passing it - or if you copy it to a C.malloc-ed array.. 2020. január 29., szerda 23:12:37 UTC+1 időpontban aotto1...@gmail.com a következőt írta: > > Hi, > > I try to use a *C* library with *GO* and have a

Re: [go-nuts] Load function from golang.org/x/tools/go/packages throws "argument list too long" error

2020-01-29 Thread Paul Jolly
cc golang-tools, bcc golang-nuts Michael Matloob will be well-placed to advise here. On Wed, 29 Jan 2020 at 22:12, adam.welc via golang-nuts wrote: > > I am trying to analyze a large application using Go's static analysis > support. I am using the "packages" package to load all application

[go-nuts] Anomaly in RunCommand and the exit status of the child process

2020-01-29 Thread Subramanian Sridharan
Hi guys, I'm in need of using the "script" command (more info about script in the end) in Linux to run a couple of commands and get the exit status of the second command. *Here is my code snippet:* package main import ( "fmt" "os/exec" ) func main() { op, err := exec.Command("script",

[go-nuts] Re: Go Module and Build Tag

2020-01-29 Thread Volker Dobler
Build tags are per build, not per package. So no, you cannot. V. On Wednesday, 29 January 2020 04:03:15 UTC+1, Henry wrote: > > Hi, > > I wonder whether it is possible to specify a dependency's build tags in go > module. Let's say that Project A depends on Library B. Library B has > optional

Re: [go-nuts] JSON: Having trouble parsing map keys with dots like {"foo.bar":"baz"}

2020-01-29 Thread Mark Hansen
Ah, I see what's going on: Go is mapping the "qux" field to the Qux struct arg just because they're case-insensitively equal. Go's totally ignoring my invalid struct tag. D'oh, I was totally holding it wrong. Thanks everyone! :-) On Wed, 29 Jan 2020 at 08:12, Mark Hansen wrote: > Ah, thanks!

[go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-29 Thread JuciÊ Andrade
Change is needed to keep people interest. In particular, to keep highly capable people big challenges are needed. "After ~12.5 years at Google and ~10 years working on Go (#golang ), it's time for me to do something new. Tomorrow is my last day at Google." - Brad

[go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-29 Thread Everton Marques
Not a loss of mindshare: It'd be nice to primarily work in Go rather than work on Go. https://bradfitz.com/2020/01/27/leaving-google -- 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