Re: [go-nuts] RISCV & Golang custom-compilations ahead?

2020-09-13 Thread josvazg
Thanks for the explanation! So, in summary, not a big deal. For standard RISCV ISA variants, GORISCV flag values for each variant should be used, probably accepting combinations. Support for standard ISA modules could be community contributions mainly. For popular custom RISCV ISA extensions

[go-nuts] Re: How to send mail using .EML file/content in Golang?

2020-09-13 Thread Tamás Gulácsi
Use DialSender returned by gomail.Dial. You don't need the parsed message for it, just the from and to addresses, and write the contents of the .eml file into the WriterTo as is. sandip bait a következőt írta (2020. szeptember 14., hétfő, 1:06:50 UTC+2): > I am using Standard *gomail

Re: [go-nuts] How to use build tags with go run

2020-09-13 Thread Gert
Thanks :) working On Monday, September 14, 2020 at 5:12:47 AM UTC+2 Kurtis Rader wrote: > I'll bet that `go run -tags local .` works. Because `go run` allows > arguments after the package name that are passed to the program you have to > specify build flags before the package name. > > On

Re: [go-nuts] How to use build tags with go run

2020-09-13 Thread Kurtis Rader
I'll bet that `go run -tags local .` works. Because `go run` allows arguments after the package name that are passed to the program you have to specify build flags before the package name. On Sun, Sep 13, 2020 at 8:07 PM Gert wrote: > // +build local > > This works for > go build -tags local >

[go-nuts] How to use build tags with go run

2020-09-13 Thread Gert
// +build local This works for go build -tags local go test -tags local But for some reason go run ignores the local tag? go run . -tags local -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

[go-nuts] Help merging fix to http2 code

2020-09-13 Thread Jared Newman
Hey Gophers, Github issue #40423 details an issue that can cause an http.Server running http2 to fail to return connection-level flow control which ultimately causes the connection to hang. The fix to this issue is 1 line change (with 60 lines of

[go-nuts] How to send mail using .EML file/content in Golang?

2020-09-13 Thread sandip bait
I am using Standard *gomail * package for sending mails in Golang. The mail generation part is happing from some other component which i am storing it in a particular location (i.e */path/sample.eml* file). And hence , i have pre-cooked mail body in .EML

Re: [go-nuts] RISCV & Golang custom-compilations ahead?

2020-09-13 Thread Ian Lance Taylor
On Sun, Sep 13, 2020 at 1:50 AM josvazg wrote: > > This is not a proposal, just a curiosity question to check if anyone in the > Go ecosystem has already thought on this issue and have some solutions in > mind. > > I might be late to this realization, but nowadays is pretty clear Intel >

Re: [go-nuts] RISCV & Golang custom-compilations ahead?

2020-09-13 Thread Joop Kiefte
I think because of the very modular design of the Go compiler, adapting it to work better for any specific RISCV variant would basically be trivial compared to other complicated compiler designs. [Joop Kiefte - Chat @ Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=ol23b)

Re: [go-nuts] cgo cross compilation to arm failed

2020-09-13 Thread Jan Mercl
On Sun, Sep 6, 2020 at 10:53 PM 'Hubert Hirtz' via golang-nuts wrote: > I am trying to cross-compile a project that depends on sqlite3 on a > amd64 machine (host) for an armhf machine (target), using clang with the > appropriate "--target" flag. > > The build fails on runtime/cgo with the

Re: [go-nuts] Re: Is there a gui library for Go, like Gtk+ or similar, which can be used to build statically linked executables ?

2020-09-13 Thread Stephen Illingworth
I've been using the Go bindings for Dear Imgui with great success. https://github.com/inkyblackness/imgui-go On Saturday, 12 September 2020 at 01:05:11 UTC+1 pcha...@pcsw.us wrote: > There is a gtk binding, but I'm not sure if it's fully cross platform. > > https://github.com/gotk3/gotk3 > >

Re: [go-nuts] Q about memory allocation/cleanup with interfaces

2020-09-13 Thread Jesper Louis Andersen
On Sun, Sep 13, 2020 at 1:42 PM Jesper Louis Andersen < jesper.louis.ander...@gmail.com> wrote: > Second, garbage collection must run. It runs periodically, but it can take > some time before it does so, and if you check memory usage right after > you've freed up data, it might not have run yet.

[go-nuts] What are the best practices for go build tools?

2020-09-13 Thread cpu...@gmail.com
Hello experts, I'm currently using //go:generate with external and module-internal tools. All external tools are documented in tools.go: // +build tools package main import ( _ "github.com/golang/mock/mockgen" _ "github.com/mjibson/esc" ) However, the existing setup has a couple of

Re: [go-nuts] Q about memory allocation/cleanup with interfaces

2020-09-13 Thread Jesper Louis Andersen
It is perhaps easiest if I go through the conditions which must be met for data to be reclaimed by the Operating System: First, the data must be unreachable by goroutines through a path of pointers. When you nil the object, you break such a path, but you must make sure there are no other such

Re: [go-nuts] handling database.Query empty set

2020-09-13 Thread Andy Hall
I can assure you my query returns multiple rows which I why I then iterate around the result set and pass to conn.Write in a loop...I am aware of QueryRow and use it elsewhere...but agreed I should perhaps RTFM a bit more thanks !! On Sunday, September 13, 2020 at 10:49:57 AM UTC+1 mb0 wrote:

Re: [go-nuts] handling database.Query empty set

2020-09-13 Thread Martin Schnabel
sorry Andy, it seems i haven't read your example carefully enough. your question was what to do if the query returns multiple rows. i tried to explain that. however the query in your example looks like it will only ever return a single row, because you probably marked the username column in

[go-nuts] RISCV & Golang custom-compilations ahead?

2020-09-13 Thread josvazg
This is not a proposal, just a curiosity question to check if anyone in the Go ecosystem has already thought on this issue and have some solutions in mind. I might be late to this realization, but nowadays is pretty clear Intel monolithic ISA dominance is threatened. ARM is taking over Macs

Re: [go-nuts] handling database.Query empty set

2020-09-13 Thread Andy Hall
thanks martin...it seems with no query handling the database Next func does not run anyway as the rows evaluate to false in the for loop... // tell other players in the room you have entered rows_users, err := database.Query("SELECT username FROM users WHERE room = ? AND username != ?", room,