Re: [go-nuts] swig and go - g++4.8 does not have -no-pie

2017-06-25 Thread jkleong
Thanks, my gcc and g++ versions were indeed different. I've set them both to 4.8 now and the -no-pie error has gone away. I'm seeing warnings from "go build" command regarding syntax in the c++ library - if they are just warnings, would go install continue with placing output files in the $GOBI

[go-nuts] Re: Attemping a native Go android app, running into gobind error

2017-06-25 Thread Dan Ballard
Well, the fix to gobind was simple, just add GOROOT to the env of cmds being execued https://github.com/dballard/mobile/commit/ff01053d86dfbd6f8699e82b06e762c14ea269bd Tho actually contributing it back seems like a chore, signing up to the golang entierly specific workflow. So maybe that'll be a

[go-nuts] github.com/golang/glog: Using replacement flag packages

2017-06-25 Thread Ivan Vučica
Hello, Since glog's readme recommends firing off an email to golang-nuts to report possible issues, here I go. I really like the idea of specifying flags in flagfiles and environment variables. This Go package seems to let me do that, while staying pretty much API-compatible with the standard fla

[go-nuts] Re: How to Sync() a file?

2017-06-25 Thread Farid Shahy
Thanks it works using Seek(0, 0) without calling Sync(). On Monday, June 26, 2017 at 1:50:53 AM UTC+4:30, Farid Shahy wrote: > > Hi > I have opened two files and want to use *io.Copy* to read from one file > and write to another, but it does not work. > If I close first file and then reopen it*

[go-nuts] Re: How to Sync() a file?

2017-06-25 Thread Nathan Kerr
I assume that you mean by io.Copy not working correctly is that you expect the entire contents of File1.txt to be in File2.txt. This does not happen in your code (without reopening f1) because Files maintain an offset inside the file that remembers where the next operation should take place. Af

Re: [go-nuts] How to Sync() a file?

2017-06-25 Thread Ian Lance Taylor
On Sun, Jun 25, 2017 at 2:19 PM, Farid Shahy wrote: > > I have opened two files and want to use io.Copy to read from one file and > write to another, but it does not work. > If I close first file and then reopen it io.Copy will work correctly.Can > anybody please help on this issue? > >> f1, err :

[go-nuts] Re: How can I make my own reader

2017-06-25 Thread Nathan Kerr
>From the docs : Read reads up to len(p) bytes into p. This lets the caller of Read manage the allocation and re-use of p. It also means your Read method has to work within the confines of whatever p you are given. If the data being read is larger than p, then the R

[go-nuts] How to Sync() a file?

2017-06-25 Thread Farid Shahy
Hi I have opened two files and want to use *io.Copy* to read from one file and write to another, but it does not work. If I close first file and then reopen it* io.Copy* will work correctly.Can anybody please help on this issue? f1, err := os.Create("File1.txt") > checkErr(err, "Error creating F

Re: [go-nuts] How to manage multiple versions of Go?

2017-06-25 Thread Christoph Berger
> Reproducible builds is common nowadays and that requires you use the same > version of the Go compiler, for instance. Agreed. I did not want to imply that *my* experience with Go compatibility must apply to everyone else. > On the other hand, if you do containerize your world anyhow, that ma

Re: [go-nuts] How to manage multiple versions of Go?

2017-06-25 Thread Christoph Berger
> Could you go into a bit more detail on how you would setup a local docker > container for your Go development? One example has been given by buddyspike already. Two blog articles for getting started: https://blog.docker.com/2016/09/docker-golang/

Re: [go-nuts] Re: How to manage multiple versions of Go?

2017-06-25 Thread Rob Pike
I just use the shell for this: % cat bin/go1.4 #!/bin/sh export GOARCH=amd64 export GOOS=darwin export GOROOT=/home/r/go1.4 # Note! export GOBIN=$GOROOT/bin exec $GOBIN/go "$@" % Then when I want to run Go 1.4 tests, I just say "go1.4 build" instead of "go build". -rob On Mon, Jun 26, 2017

Re: [go-nuts] Base64

2017-06-25 Thread Ian Lance Taylor
You are sending this e-mail to golang-nuts@googlegroups.com. Why are you doing that? Please do not repeat your question. We already saw your question. We do not know the answer. You are asking the wrong people in the wrong place. Ian On Sun, Jun 25, 2017 at 12:44 PM, asolkar.c...@yahoo.in

Re: [go-nuts] Re: How to manage multiple versions of Go?

2017-06-25 Thread Jesper Louis Andersen
On Sun, Jun 25, 2017 at 4:36 PM Christoph Berger < christoph.g.ber...@gmail.com> wrote: > Thanks to the Go 1 Compatibility Promise, it was never a problem for me to > always use the latest Go version (via Homebrew, BTW, which keeps my Go > installation up-to-date with next-to-zero effort). > > Tha

Re: [go-nuts] Base64

2017-06-25 Thread asolkar.c...@yahoo.in
Hi Shawn, I have two Window machines one has *Server 2008 R2*and another on has *Server 2012 R2* with same *JDK version 1.8.* I am working on a financial application where I receive a base64 encoded public encrypted value which I need to decode using Base64, decrypt and validate. My program is

Re: [go-nuts] Base64

2017-06-25 Thread Shawn Milochik
We're missing what your question has to do with Go. This is a mailing list for the Go programming language. You seem to be asking a question about Java, which is not an appropriate topic here. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To un

Re: [go-nuts] Base64

2017-06-25 Thread Manish Asolkar
Hi Steven, Can you suggest me on problem post before? -- 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 options

[go-nuts] GoBkm 0.8 released

2017-06-25 Thread Thomas Bellembois
Hello, I have released a new version (0.8) of the GoBkm online bookmarks manager. The GUI has been improved. Regards, Thomas Bellembois -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails f

[go-nuts] Re: How to manage multiple versions of Go?

2017-06-25 Thread buddyspike
If you want to build with different versions of go, you could play with PATH during build. Perhaps a better option is to use a container with go toolchain pre-configured for each version. For example https://hub.docker.com/r/buddyspike/go/~/dockerfile/ On Sunday, 25 June 2017 06:12:38 UTC+10,

[go-nuts] How can I make my own reader

2017-06-25 Thread suconghou
package main import ( "io" "log" "os" ) type test struct { name string } func (a *test) Read(p []byte) (int, error) { var size int for { // I want to put large data to response the read ; some data whatever I want ... size = size + 102400 // condition

[go-nuts] Re: How to manage multiple versions of Go?

2017-06-25 Thread st ov
Could you go into a bit more detail on how you would setup a local docker container for your Go development? Also how does the following experience relate to the compatibility promise? https://github.com/moovweb/gvm#background Thanks! On Sunday, June 25, 2017 at 7:36:20 AM UTC-7, Christoph Be

[go-nuts] Re: How to manage multiple versions of Go?

2017-06-25 Thread Christoph Berger
Thanks to the Go 1 Compatibility Promise, it was never a problem for me to always use the latest Go version (via Homebrew, BTW, which keeps my Go installation up-to-date with next-to-zero effort). If I ever have the need to use an older version, I'd probably use Docker for that. Advantages o

[go-nuts] Re: godoc shows methods where they're not defined

2017-06-25 Thread Tamás Gulácsi
Thanks! In retrospect, it's obvious :) -- 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 options, visit https://g

[go-nuts] Re: Go's scheduler always “stuck” after certain time when executing the code below

2017-06-25 Thread Ronald
Thanks to all of you :) Recently I have implemented a sub-option in the `go tool trace` named "diagreedy" which means "diagnoses and finds out the greediest several goroutines". This tool already helped us track down several deep hiden problems in our go applications and achieved more stable

[go-nuts] Re: godoc shows methods where they're not defined

2017-06-25 Thread Nathan Kerr
Since *conn is embedded in DirectLob, its method sets are promoted to DirectLob's method sets. Since BeginTx is now part of DirectLob's method sets, it acts like any other member of the method sets would; in this case it is an exported method on DirectLob. This is a feature because it allows th

[go-nuts] [No Qns] My love towards Golang

2017-06-25 Thread John Kenedy
Yeah I can say that I am deeply fall in love with Golang Golang is the only language that so far caught my attention after I dislike C++ and C on how I need to delete the memory I have allocated on heap and need to determine when to do that and it affect my program if I were to wrongly dealloca