[go-nuts] is it a waste of time to study old synchronization algorithms?

2017-02-24 Thread Marwan abdel moneim
Algorithms like Peterson’s algorithm and others , which i think was developed before languages provide Mutexes or Channels (or

[go-nuts] Expressing test dependence

2017-02-24 Thread Dave Cheney
Within the testing package you choice is t.Skip and some set of package level variables. Maybe the more involved testing frameworks like convoy or gocheck offer more final version of t.Fatal. However, from the situation you've presented it feels to me that your solving the wrong problem. If

[go-nuts] Expressing test dependence

2017-02-24 Thread kpratt
What I want is a way to say if Test_A fails then don't run Test_B because it's guaranteed to fail and that just creates noise in the output. So instinctively I'd like something like annotations for this. // @DependsOn [ "Test_A" ] func Test_B(t *testing.T) { .test stuff }

[go-nuts] Re: Minimizing golang docker images

2017-02-24 Thread Steve Roth
Hello, Sankar, The minimal Docker image for a Go webapp contains absolutely nothing in its filesystem other than the binary itself. Here's an example Dockerfile for such an image: FROM scratch COPY appname / EXPOSE 8000 CMD ["/appname"] However, to build the image, you have to have a full Go

[go-nuts] Re: first try with templates

2017-02-24 Thread 'simon place' via golang-nuts
well option3 seems to work https://play.golang.org/p/XMih6ocmGY -- 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

Re: [go-nuts] Go Language tests

2017-02-24 Thread Ian Lance Taylor
On Fri, Feb 24, 2017 at 4:51 PM, wrote: > > I am testing Go language on Nano Server. > > Are there any Acceptance tests or tests the Go team has created to tests Go > builds? > > If possible I would like to run these tests on Nano Server. Are you looking for any specific

Re: [go-nuts] first try with templates

2017-02-24 Thread 'simon place' via golang-nuts
thanks, but the handed-in data, on each execute, doesn't seem like a good fit for a global var, and there will always be the actual one-off 'context' data i will need to push in, so its not available. so if you really can't do this option1: i could use a function, but that seemed

[go-nuts] Re: Code review/Advice - reading and editing a CSV

2017-02-24 Thread Mandolyte
I deal with CSV files a lot. I have made most available here: https://github.com/mandolyte/csv-utils Hope it helps, Cecil -- 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

[go-nuts] Go Language tests

2017-02-24 Thread bryontrott
Hello, I am testing Go language on Nano Server. Are there any Acceptance tests or tests the Go team has created to tests Go builds? If possible I would like to run these tests on Nano Server. Thanks, Bryon Trott -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] first try with templates

2017-02-24 Thread Ian Davis
On Fri, 24 Feb 2017, at 11:40 PM, 'simon place' via golang-nuts wrote: > https://play.golang.org/p/NGU4kstcT- > > just trying to put one var into one template and i'm failing!, see > above, i've tried the docs, googling and randomly guessing. please > someone put me out of my misery.

[go-nuts] first try with templates

2017-02-24 Thread 'simon place' via golang-nuts
https://play.golang.org/p/NGU4kstcT- just trying to put one var into one template and i'm failing!, see above, i've tried the docs, googling and randomly guessing. please someone put me out of my misery. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Support for the race detector on ARM

2017-02-24 Thread Owen Waller
Hi Dimitry, > > > > ThreadSanitizer does not work on any 32-bit platforms. It assumes that > > it can reserve huge continuous chunks of address space for various > > things. > > > > > > > > > > > > Tsan reserves 4X for shadow memory (where X is amount of memory where > > > > user data

Re: [go-nuts] Support for the race detector on ARM

2017-02-24 Thread 'Dmitry Vyukov' via golang-nuts
On Fri, Feb 24, 2017 at 9:24 PM, Owen Waller wrote: > Hi Dimitry, > > > If there is somebody who is willing to work on this, then yes. Otherwise, > maybe. > > > I have created https://github.com/golang/go/issues/19273 in order to track > this. > > ThreadSanitizer does not work

Re: [go-nuts] Support for the race detector on ARM

2017-02-24 Thread Owen Waller
Hi Dimitry, > > If there is somebody who is willing to work on this, then yes. Otherwise, > maybe. I have created https://github.com/golang/go/issues/19273 in order to track this.  > > > > ThreadSanitizer does not work on any 32-bit platforms. It assumes that > > it can reserve huge

[go-nuts] Re: Code review/Advice - reading and editing a CSV

2017-02-24 Thread peterGo
Robbie, Fixed some typos: https://play.golang.org/p/GGjoeOYfRN Peter On Friday, February 24, 2017 at 12:48:44 PM UTC-5, peterGo wrote: > > Robbie, > > It's hard to understand what you are doing. > > The header says that there is no grade and sg is not where you say it is. > Why are you using a

[go-nuts] Custom serializer issue

2017-02-24 Thread Fabrice Vaillant
Hi For a custom project, I'm trying to write a serializer for a trie datastructure. I was using gob but it is slow due to it's use of reflect, and I wanted to learn something new. The struct is mainly composed of nodes: // Node implements a node of the tree type Node struct { // rw is a

[go-nuts] Re: Code review/Advice - reading and editing a CSV

2017-02-24 Thread peterGo
Robbie, Fixed a typo: https://play.golang.org/p/JbKGJMw4r3 Peter On Friday, February 24, 2017 at 12:48:44 PM UTC-5, peterGo wrote: > > Robbie, > > It's hard to understand what you are doing. > > The header says that there is no grade and sg is not where you say it is. > Why are you using a

[go-nuts] Re: Code review/Advice - reading and editing a CSV

2017-02-24 Thread peterGo
Robbie, It's hard to understand what you are doing. The header says that there is no grade and sg is not where you say it is. Why are you using a channel? Why are you limiting the size of your input by reading the entire file into memory? And so on. My best guess is that you want to do

[go-nuts] Re: Variadic parameters to SQL-queries, specifically gopkg.in/rana/ora.V*

2017-02-24 Thread Trond Kandal
Thank You so much again, Sir! Sorry, I have been searching around, but not found that documentation. Now I have learned a lot! Trond. -- 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

[go-nuts] Re: Variadic parameters to SQL-queries, specifically gopkg.in/rana/ora.V*

2017-02-24 Thread pierre . curto
Yes you can, use append: https://golang.org/ref/spec#Appending_and_copying_slices Le vendredi 24 février 2017 17:09:12 UTC+1, Trond Kandal a écrit : > > Thank You very much, Sir! > > That did the trick! > I am not used to the small and subtle tricks of Go yet. > > Is there any way I can append

[go-nuts] Re: Go Compiler Intermediate Representation

2017-02-24 Thread Arpit Aggarwal
Thank you very much adon... Its very useful for my project. Again, thanks a lot Regards Arpit On Wednesday, February 22, 2017 at 2:13:25 PM UTC-8, adon...@google.com wrote: > > On Tuesday, 21 February 2017 12:23:44 UTC-5, Arpit Aggarwal wrote: >> >> I am doing a project in which I need Go

[go-nuts] Re: Variadic parameters to SQL-queries, specifically gopkg.in/rana/ora.V*

2017-02-24 Thread Trond Kandal
Thank You very much, Sir! That did the trick! I am not used to the small and subtle tricks of Go yet. Is there any way I can append parameters to the variable as I go, before passing it to the query? -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Minimizing golang docker images

2017-02-24 Thread Sankar
Hi I have a bunch of services (all sources in a single git project) which I want to dockerize and deploy in kubernetes (and run CI too preferably via minikube). I have seen that it is possible to generate small docker images for golang HTTP servers by building them separately outside the

[go-nuts] Re: Variadic parameters to SQL-queries, specifically gopkg.in/rana/ora.V*

2017-02-24 Thread pierre . curto
Do a: rst, err := stmt.Qry(params...) The 3 dots will expand the slice for the variadic function. Le vendredi 24 février 2017 16:05:42 UTC+1, Trond Kandal a écrit : > > Thank Your for your answer, Sir! > > Hmmm... > I do not seem to get it working > > sqlQry := "SELECT * FROM TIA_EMNEINFO

[go-nuts] Re: Variadic parameters to SQL-queries, specifically gopkg.in/rana/ora.V*

2017-02-24 Thread Trond Kandal
Thank Your for your answer, Sir! Hmmm... I do not seem to get it working sqlQry := "SELECT * FROM TIA_EMNEINFO WHERE EMNEKODE = :1" stmt, err := ses.Prep(sqlQuery, ora.OraI64, ora.OraS, ora.OraS, ora.OraS, ora.OraS, ora.OraS, ora.OraI64, ora.OraS, ora.OraI64, ora.L, ora.L, ora.OraI64)

[go-nuts] Variadic parameters to SQL-queries, specifically gopkg.in/rana/ora.V*

2017-02-24 Thread Tamás Gulácsi
params:=[]interface{}{1,time.Now(),"a"} sql.exex("select count(0) from table where id=:1 and dt<:2 and z<>:3", params...) See "variadic parameters". -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] GoQt fatal error: QAbstractAnimation :no such file or directory

2017-02-24 Thread Nikita Melnikov
I tryed to compile GoQt for developing desctop applecations. I followed the instruction from the official wiki guied on Qt website. When i tryed to go run an exsample from the examples folder i grabbed an error go run

[go-nuts] Code review/Advice - reading and editing a CSV

2017-02-24 Thread Robbie Wright
Hi this is my first go program and I am looking for some feedback and help writing buffer to csv. To give you an idea of the structure of the data I have run head on the input file gives output seen at the bottom. package main import ( "bytes" "encoding/csv" "fmt"

[go-nuts] Variadic parameters to SQL-queries, specifically gopkg.in/rana/ora.V*

2017-02-24 Thread trond . kandal
Hello Maybe this is a very simple and stupid, but I have not found out how to specify variadic arguments to SQL-queries. I am a novice and I do not understand how this work in Go. I have some REST-endpoints to implement, each endpoint may receive GET-parameters which I want to pass on to the

Re: [go-nuts] errors.New("...") vs package level error vars

2017-02-24 Thread Manlio Perillo
Il giorno venerdì 24 febbraio 2017 14:30:54 UTC+1, Steven Hartland ha scritto: > > Internal errors are one of my pet peeves about the core go libs, as you > say they are inconsistent and you end up doing all sorts of string checks > which are not only hackey but are very fragile too. We had a

Re: [go-nuts] errors.New("...") vs package level error vars

2017-02-24 Thread Steven Hartland
Internal errors are one of my pet peeves about the core go libs, as you say they are inconsistent and you end up doing all sorts of string checks which are not only hackey but are very fragile too. We had a break in our code due to just this when updating to 1.8. There are very few reason why

Re: [go-nuts] Support for the race detector on ARM

2017-02-24 Thread 'Dmitry Vyukov' via golang-nuts
On Fri, Feb 24, 2017 at 2:39 PM, Owen Waller wrote: > Hi Dimitry, > > C++ ThreadSanitizer works on arm64. So making it work for Go should be > a modest amount of work. > > > Thanks for confirming this. Should I now Open a issue on Github so we can > track adding this? If

Re: [go-nuts] Debugging long GC pauses

2017-02-24 Thread Oliver Beattie
Thanks for getting back to me. I have posted the output from a 30-second runtime/trace session here, which appears to show three 80ms GC's: https://www.dropbox.com/s/wc3hp6k17txaofh/staging-trace.tar.gz?dl=0 I'm struggling a bit to interpret what's there though. On Thursday, February 23, 2017

Re: [go-nuts] Reflection: Constructing a struct type that satisfies an interface

2017-02-24 Thread Ivan Vučica
Cool, that's exactly the stuff I was interested in. (I was actually trying to figure out why implementing "grpc-web" is not a trivial problem. :)) On Thu, Feb 23, 2017 at 12:33 PM, Axel Wagner wrote: > From what I know, a) with the normal protobuf package, you

Re: [go-nuts] Support for the race detector on ARM

2017-02-24 Thread Owen Waller
Hi Dimitry, > > C++ ThreadSanitizer works on arm64. So making it work for Go should be > a modest amount of work. Thanks for confirming this. Should I now Open a issue on Github so we can track adding this? Also, does it exist for any other platforms? There are hints of PPC64. What about MIPS64?

Re: [go-nuts] Re: correct/working 9p2000 library in Go?

2017-02-24 Thread Ilya Kostarev
Hi, David thanks for the code, slightly offtopic, seems you heavily use Acme which can explore 9p file system directly without mounting, but I forget the syntax on plan9port and can't find appropriate documentation. Can you kindly give me a hint. Cheers __ Ilya On 02/24/2017 10:20 AM, David

[go-nuts] errors.New("...") vs package level error vars

2017-02-24 Thread lee . hambley
I'm currently upgrading an application to Go 1.8 (thanks for the compile time speed boost, by the way). I'm falling over a lot of issues with URL parsing now blowing up on RFC3986 compliance issues (see

Re: [go-nuts] Shiny gldriver Texture.Fill

2017-02-24 Thread Dmitry Kravchenko
Thank you On Friday, February 24, 2017 at 11:53:30 AM UTC+3, Nigel Tao wrote: > > On Sun, Feb 19, 2017 at 6:11 PM, Dmitry Kravchenko > wrote: > > When will Texture.Fill be implemented in Shiny gldriver? > > I mailed out https://go-review.googlesource.com/37415 > -- You

Re: [go-nuts] Support for the race detector on ARM

2017-02-24 Thread 'Dmitry Vyukov' via golang-nuts
C++ ThreadSanitizer works on arm64. So making it work for Go should be a modest amount of work. ThreadSanitizer does not work on any 32-bit platforms. It assumes that it can reserve huge continuous chunks of address space for various things. ThreadSanitizer is not dependend on underlying hardware

Re: [go-nuts] Shiny gldriver Texture.Fill

2017-02-24 Thread Nigel Tao
On Sun, Feb 19, 2017 at 6:11 PM, Dmitry Kravchenko wrote: > When will Texture.Fill be implemented in Shiny gldriver? I mailed out https://go-review.googlesource.com/37415 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To