[go-nuts] Re: Go policy does not fully support previous release

2019-10-01 Thread Christoph Berger
A question based on genuine interest: Which factors make it hard for you to upgrade to the latest Go release? On Monday, September 30, 2019 at 9:49:39 PM UTC+2, Liam wrote: > > I was startled to learn that regressions found in the previous release > (currently 1.12.x) will not be fixed in that

Re: [go-nuts] Call of a Go-function inside C-code

2019-10-01 Thread Ian Lance Taylor
On Tue, Oct 1, 2019 at 7:36 PM wrote: > > what is wrong with the following simple code, which yields "undefined > reference for F" ? > > > file f.go: > > package main > // #include "f.h" > // void f (int a) { F(a) } > import "C" > > func F(a int) { println(a) } > func main() { C.f(7) } > > >

[go-nuts] Re: causal profiling in Go

2019-10-01 Thread Gerald Stan
Hi, interesting work. @Ingo is that the only way run casual profiling in go? -- 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] Call of a Go-function inside C-code

2019-10-01 Thread dr . ch . maurer
Dear community, what is wrong with the following simple code, which yields "undefined reference for F" ? file f.go: package main // #include "f.h" // void f (int a) { F(a) } import "C" func F(a int) { println(a) } func main() { C.f(7) } file f.h: extern void F (int a); //export F

[go-nuts] Re: A question about performance when traverse the array with row-wise and column-wise

2019-10-01 Thread lgodio2
Are your test results different when rowSize = colSize> 1000 say ?? On Sunday, September 29, 2019 at 10:18:15 AM UTC-4, zct wrote: > > The test code is below: > package main > > import ( > "testing" > ) > > const rowSize = 100 > const colSize = 100 > > var array [rowSize][colSize]int >

Re: [go-nuts] HTTP timeout per handler

2019-10-01 Thread Nitin Sanghi
Yes you can do by check size of file or whatever payload you are receiving. You can make run time decision for time On Tue, Oct 1, 2019, 10:57 AM Santiago Corredoira wrote: > Hi Nitin, but how about making the timeout longer thant the default? For > example having a general write timeout of 1

Re: [go-nuts] HTTP timeout per handler

2019-10-01 Thread Nitin Sanghi
Santiago, you can use context to cancel the request after the certain time you like. ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) defer cancel() // releases On Mon, Sep 30, 2019, 8:54 PM Santiago Corredoira wrote: > Using the http package, timeouts are

Re: [go-nuts] Golang library for - ORM & Schema Migration

2019-10-01 Thread Sam Whited
On Mon, Sep 30, 2019, at 21:05, bram wrote: > Thank you all. For schema migration i am looking for similar tool > like flyway. I'm not sure if it's like flyway, but I use a library that I wrote, code.soquee.net/migration [1]. The idea is that it gives you the tools you need to write a migration

Re: [go-nuts] go 1.13 won't compile

2019-10-01 Thread rob
I figured out the source of these reported difference in behaviors. My win10 system does not have a go.mod file, but my LinuxMint system does.  When I deleted that (and unset GO111MODULE) I was able to compile on LinuxMint. So the differences depend on whether there is already a go.mod file

[go-nuts] Go modules - Apache Maven BOM equivalent?

2019-10-01 Thread Stevo Slavić
Hello Gophers, Is anyone aware is it already possible or are there any plans to support in Go modules something like Apache Maven's BOM POM support for: - ability to publish release metadata (modules and versions) about a multi-module project (e.g. like Kubernetes) and then also - ability to

Re: [go-nuts] Golang library for - ORM & Schema Migration

2019-10-01 Thread Andrew Pillar
I created a simple migration tool called mgrt [1], which operates on pure SQL scripts that are defined by the user. It has support for MySQL, SQLite and PostgreSQL. Give it a try if you're looking for a simple migration tool that just uses plain SQL under the hood. It's written in Go, so building

[go-nuts] Re: Can’t get latest package version with modules

2019-10-01 Thread Christophe Meessen
I finally understood. The GOPATH definition is not relevant here. It is the presence of the go.mod file that determines if the module mode is in application. With go1.13, without go.mod file, the old GOPATH mode is in application. The go.mod file is create by "go mod init [package name]".

Re: [go-nuts] Re: Can’t get latest package version with modules

2019-10-01 Thread Andrew Pillar
>Thank you all. For schema migration i am looking for similar tool like flyway. I created a simple migration tool called mgrt [1], which operates on pure SQL scripts that are defined by the user. It has support for MySQL, SQLite and PostgreSQL. Give it a try if you're looking for a simple

[go-nuts] Re: Can’t get latest package version with modules

2019-10-01 Thread Christophe Meessen
When GOPATH is defined (~/go), go get -u github.com/XXX/go-YYY@latest doesn’t work. I get the error message: go: cannot use path@version syntax in GOPATH mode This is with go1.13.1. Does this mean that GOPATH must be undefined to use modules with 1.13.1 ? I thought that with go1.13