Re: [go-nuts] Building golang libraries

2017-09-29 Thread desaiabhijit
Basically want to distribute my library without code and then client will refer it as a library in his application Rgds, Abhi On Saturday, September 30, 2017 at 11:14:20 AM UTC+5:30, Abhijit Desai wrote: > > yes Ian > > Thanks for the help > > Can you please provide me for Ubuntu > > Thanks, >

Re: [go-nuts] Building golang libraries

2017-09-29 Thread desaiabhijit
yes Ian Thanks for the help Can you please provide me for Ubuntu Thanks, Abhi On Friday, September 29, 2017 at 7:17:21 PM UTC+5:30, Ian Lance Taylor wrote: > > On Thu, Sep 28, 2017 at 10:02 PM, > > wrote: > > > > Can you please provide command line to build executable using library > >

Re: [go-nuts] XML unmarshaller cannot handle space padded numbers

2017-09-29 Thread Sam Whited
On Fri, Sep 29, 2017, at 10:00, Per Persson wrote: > I made a commit > > > that I was about to make into a pull request, but then I saw the > contribution information and now I'm not sure where to propose the > cha

Re: [go-nuts] os/exec stdout bytes.Buffer and timeout behavior?

2017-09-29 Thread Ian Lance Taylor
On Fri, Sep 29, 2017 at 1:33 PM, Alex Buchanan wrote: > > Ok, that's a great explanation, thanks. Do you have a recommendation for how > to exit early? Would StdoutPipe() help? I tried setting Setpgid to true, but > probably os/exec doesn't pay attention to process groups. > > Alternatively, I c

Re: [go-nuts] os/exec stdout bytes.Buffer and timeout behavior?

2017-09-29 Thread Alex Buchanan
Ok, that's a great explanation, thanks. Do you have a recommendation for how to exit early? Would StdoutPipe() help? I tried setting Setpgid to true, but probably os/exec doesn't pay attention to process groups. Alternatively, I can configure my shell scripts to close stdout/err on exit? Not pr

[go-nuts] Aborting tests early if any fail + getting streaming output

2017-09-29 Thread Traun Leyden
Is it possible to abort running a test suite if one of the tests fails? In my case I'm running the test against multiple packages: go test github.com/path/... and if one test fails, it seems to continue on running the rest of the tests. (if this is not the expected behavior, I can provide m

Re: [go-nuts] os/exec stdout bytes.Buffer and timeout behavior?

2017-09-29 Thread Ian Lance Taylor
On Fri, Sep 29, 2017 at 12:33 PM, Alex Buchanan wrote: > > package main > > import ( > "bytes" > "context" > "log" > "os/exec" > "time" > ) > > func main() { > var stdout bytes.Buffer > > ctx, cancel := context.WithTimeout(context.Background(), time.Second) > defer cancel() > > c

[go-nuts] os/exec stdout bytes.Buffer and timeout behavior?

2017-09-29 Thread Alex Buchanan
package main import ( "bytes" "context" "log" "os/exec" "time" ) func main() { var stdout bytes.Buffer ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() cmd := exec.CommandContext(ctx, "/bin/sh", "-c", "sleep 10; echo foo") cmd.Stdout = &st

Re: [go-nuts] godoc only indexes packages in GOROOT?

2017-09-29 Thread Farid Zakaria
It will serve the documentation but not searchable (index) At the moment I'm solving it thusly: cat make_index.sh godoc -goroot=/home/fmzakari/go -index -index_files=godoc_internal_index.db -write_index godoc -index -index_files=godoc_system_index.db -write_index Then I load both of those indexe

Re: [go-nuts] godoc only indexes packages in GOROOT?

2017-09-29 Thread Ayan George
farid.m.zaka...@gmail.com wrote: > Is there a reason why GODOC only indexes packages it finds in $GOROOT ? I > would like to create indices of my personal packages + the standard library. > I think it does. It looks in my ${GOPATH} and gives me what docs it can for my poorly commented code. -a

RE: [go-nuts] Redirect bug

2017-09-29 Thread Rodrigo Bahiense
If you are testing this in a browser it might be caching the redirect. Test the handler individually: https://godoc.org/net/http/httptest#example-ResponseRecorder -- Rodrigo Bahiense From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of josue.performa...@gmail.

[go-nuts] godoc only indexes packages in GOROOT?

2017-09-29 Thread farid . m . zakaria
Is there a reason why GODOC only indexes packages it finds in $GOROOT ? I would like to create indices of my personal packages + the standard library. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop recei

[go-nuts] XML unmarshaller cannot handle space padded numbers

2017-09-29 Thread Per Persson
I have some XML files with space padded numbers in some attributes (e.g. `NumberOfPoints=" 266703"`) and the unmarshaller can't handle the spaces. Booleans are trimmed before parsed , so why not numbers? I made a commit

[go-nuts] Redirect bug

2017-09-29 Thread josue . performarkt
Hello to you all Today i've been working in go server project one of the http handlers has a redirect at the end, i.e. www.google.com but when i remove from the code this redirect, it keeps redirecting to the same url. // handler in the begin func handlerSetCookie(w http.ResponseWriter, r *http

[go-nuts] Re: Variable JSON format parsing, any best practice?

2017-09-29 Thread Yaroslav Molochko
That is exactly what I was looking for! Thank you very much! -- 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 op

[go-nuts] Re: Graphing libraries in golang

2017-09-29 Thread ajstarks
SVGo is library for SVG generation, but others (some cited in this thread), have used it as a basis for building graphics and visualizations. See: [1] for examples (including how to interface to data, there's even a barchart [2] example :) [1] https://speakerdeck.com/ajstarks/the-other-sid

[go-nuts] Re: Variable JSON format parsing, any best practice?

2017-09-29 Thread Amnon Baron Cohen
No silver bullet. But you can try defining value as json.RawMessage in order to delay the parsing till you know what you have got. See http://eagain.net/articles/go-dynamic-json/ On Friday, 29 September 2017 00:41:53 UTC+1, Yaroslav Molochko wrote: > > I have following json messages: > > {"status

[go-nuts] Re: Building golang libraries

2017-09-29 Thread gary . willoughby
You could try plugins: https://golang.org/pkg/plugin/ On Friday, 29 September 2017 05:21:54 UTC+1, Abhijit Desai wrote: > > Want to create libraries ( static or dynamic ) so that that I don't want > to compile every time when I build my executable > > "github.com/everjit/Ion" <--- should not ref

Re: [go-nuts] Nested struct initialisation

2017-09-29 Thread arod . louis
Thank you! This is exactly what I was looking for. Le vendredi 29 septembre 2017 15:57:28 UTC+2, Ian Lance Taylor a écrit : > > On Fri, Sep 29, 2017 at 6:55 AM, > > wrote: > > > > Do you know why the compiler does not infer nested struct type? Was > there > > any discussion about that? > >

Re: [go-nuts] Nested struct initialisation

2017-09-29 Thread Ian Lance Taylor
On Fri, Sep 29, 2017 at 6:55 AM, wrote: > > Do you know why the compiler does not infer nested struct type? Was there > any discussion about that? > > I find myself enjoying nested struct a lot when programming in Go. But, the > initialisation is so cumbersome that I always end up removing the ne

[go-nuts] Nested struct initialisation

2017-09-29 Thread arod . louis
Hello gophers, Do you know why the compiler does not infer nested struct type? Was there any discussion about that? I find myself enjoying nested struct a lot when programming in Go. But, the initialisation is so cumbersome that I always end up removing the nested struct and giving a longer na

Re: [go-nuts] internal/poll.runtime_pollWait problem on RHEL with 3.10.0-327.el7.x86_64

2017-09-29 Thread Ian Lance Taylor
On Thu, Sep 28, 2017 at 10:12 PM, Dan Kortschak wrote: > > I have just tried replicating the issue today and this time, one > machine passes everything, while the other does not. I am beginning to > suspect that file system loads may be a possible cause (the head node > is quiet, but the file syst

Re: [go-nuts] Building golang libraries

2017-09-29 Thread Ian Lance Taylor
On Thu, Sep 28, 2017 at 10:02 PM, wrote: > > Can you please provide command line to build executable using library > > go build -linkshared main.go > > -linkshared not supported on darwin/amd64 > > > doesn't work You asked about creating either a static or dynamic library, and I explained how to

Re: [go-nuts] Parsing a CSV column with partially double-quotes in it

2017-09-29 Thread Lantos István
Ian Davis! Thank you, this is worked! 2017-09-29 9:29 GMT+02:00 Ian Davis : > Try setting r.LazyQuotes=true > > > On Thu, 28 Sep 2017, at 09:56 PM, Lantos István wrote: > > > I want to parse the following CSV structure. The column separators are > tabs: > > *package main* > > *import (* > *"

[go-nuts] Graphing libraries in golang

2017-09-29 Thread Daniel Whitenack
Hi Vikram, Great questions. In general for data related things, this is a great place to start looking for resources: https://github.com/gopherdata/resources/blob/master/tooling/README.md. that is a curated list that is kept up to date. I use https://github.com/gonum/plot quite a bit and found

Re: [go-nuts] Re: Graphing libraries in golang

2017-09-29 Thread Sebastien Binet
On Fri, Sep 29, 2017 at 10:33 AM, Vikram Rawat wrote: > thanks a lot for your reply sebestian. > > > You certainly are a good man and I have high hopes for your library too... > > But before coming to Mailing list I check almost all of them and I didn't > find anyone useful. The https://github.c

[go-nuts] Re: Graphing libraries in golang

2017-09-29 Thread Vikram Rawat
> > thanks a lot for your reply sebestian. You certainly are a good man and I have high hopes for your library too... But before coming to Mailing list I check almost all of them and I didn't find anyone useful. The https://github.com/aclements/go-gg package is not useful at all. Because th

Re: [go-nuts] Parsing a CSV column with partially double-quotes in it

2017-09-29 Thread Ian Davis
Try setting r.LazyQuotes=true On Thu, 28 Sep 2017, at 09:56 PM, Lantos István wrote: > > I want to parse the following CSV structure. The column separators > are tabs:> > *package main* > > *import (* > *"encoding/csv"* > *"fmt"* > *"log"* > *"strings"* > *)* > > *func main()

Re: [go-nuts] Re: Graphing libraries in golang

2017-09-29 Thread Sebastien Binet
Vikram, On Sep 29, 2017 8:49 AM, "Vikram Rawat" wrote: Thanks for your reply. Library seems promising. but when I run it , this errors out cannot find package "bitbucket.org/zombiezen/gopdf/pdf" in any of: C:\Go\src\bitbucket.org\zombiezen\gopdf\pdf (from $GOROOT) C:\Projects\Go\src\bitbucke

Re: [go-nuts] Re: Graphing libraries in golang

2017-09-29 Thread Dan Kortschak
To get bitbucket.org/zombiezen/gopdf/... to install, you will need to install mercurial. On Thu, 2017-09-28 at 23:49 -0700, Vikram Rawat wrote: > Thanks for your reply. Library seems promising. but when I run it , > this  > errors out > > > > cannot find package "bitbucket.org/zombiezen/gopd