Re: [go-nuts] goforward: What is it? How do I use it?

2019-06-28 Thread t hepudds
Hi AJ, To reduce the suspense, I probably should have included the full help message: $ ./gofoward help Usage: goforward [-n] [-move | -filter=REGEXP] [-replace] [-filename=NAME] SOURCE DEST -filename string destination file in which to write forwards (default "forward.go") -filt

Re: [go-nuts] goforward: What is it? How do I use it?

2019-06-28 Thread t hepudds
Hi AJ, In terms of detailed write-ups on how gofoward works, to my knowledge the best place to start is reading the commit message and then the help message you get once you build goforward. The author (Bryan Mills) has stated there is still some work to do to finish it up, including addressin

[go-nuts] Proposal: try function constructor

2019-06-28 Thread Li
I propose a addition to current try proposal to enable optional error wrapping. demo codes: package main import ( "fmt" "io" "os" ) // wrapErr is an error wrapping function func wrapErr(err error, format string, args ...interface{}) error { return fmt.Errorf( "%s: %s", fmt.Sprintf(format, args

Re: [go-nuts] goforward: What is it? How do I use it?

2019-06-28 Thread Ian Lance Taylor
On Fri, Jun 28, 2019 at 5:14 PM AJ ONeal wrote: > > I was looking at the Module page on the Wiki ( > https://github.com/golang/go/wiki/Modules ) for instruction on how to handle > breaking API changes (v2, v3, etc) and I noticed mention of the mythical > `goforward`: > >> A more sophisticated a

[go-nuts] The "leave "if err != nil" alone?" anti-proposal

2019-06-28 Thread Tyler Compton
If anyone hasn't seen it, an issue with the "proposal" tag was created earlier on the Go issue tracker titled "Proposal: leave "if err != nil" alone?" (here ). This issue seems to have resonated with a lot of people, which may be an important data point when conside

[go-nuts] goforward: What is it? How do I use it?

2019-06-28 Thread AJ ONeal
I was looking at the Module page on the Wiki ( https://github.com/golang/go/wiki/Modules ) for instruction on how to handle breaking API changes (v2, v3, etc) and I noticed mention of the mythical `goforward`: A more sophisticated approach here could exploit type aliases (introduced > in Go 1.

[go-nuts] Re: [cgo ] Export go function to C - illegal character

2019-06-28 Thread nicolas_boiteux via golang-nuts
hi don't success to solve this subject. Here an example with the simple code shown in those slides: http://akrennmair.github.io/golang-cgo-slides/#10 This code doesn't works anymore, or perhaps there is some special command line to build it ? I thought it was possible to create a C function wi

Re: [go-nuts] What is the fundamental unit of linking in Go?

2019-06-28 Thread Ian Lance Taylor
On Fri, Jun 28, 2019 at 11:39 AM wrote: > > I am pretty sure that every folder in a Go code repository creates one binary > object, maybe two with a test package alongside it. It just didn't occur to > me that it would not trace the execution path of the main, and where each of > the closures/f

Re: [go-nuts] go build vs go install in cgo

2019-06-28 Thread Ian Lance Taylor
On Fri, Jun 28, 2019 at 8:53 AM Nitish Saboo wrote: > > In case of cgo, does go build -v -x main.go and go install -v -x main.go > perform the same operation except that go install pushes the binary under > /bin. > Is the binary that gets created is same ? Yes. Ian -- You received this messa

[go-nuts] Learning to Design and Implement Scalable Systems with Go

2019-06-28 Thread Robert Weber
Hi Everyone, I'm interested in improving my software engineering knowledge and experience with scalable software systems. I currently write software for an environment that's more resource-constrained (think embedded Linux device) where there is typically only one user connected to the device a

Re: [go-nuts] What is the fundamental unit of linking in Go?

2019-06-28 Thread luka . venac
I am pretty sure that every folder in a Go code repository creates one binary object, maybe two with a test package alongside it. It just didn't occur to me that it would not trace the execution path of the main, and where each of the closures/function references in this case are stored in a ma

Re: [go-nuts] What is the fundamental unit of linking in Go?

2019-06-28 Thread Jan Mercl
Please provide a minimal, self contained demonstration code that reproduces the problem. Then it should be hopefully easy to either explain why things work they do or it'll be a nice test case for the fix to the issue this may actually be. Thanks. On Fri, Jun 28, 2019, 20:10 wrote: > I have come

[go-nuts] What is the fundamental unit of linking in Go?

2019-06-28 Thread luka . venac
I have come up against something a bit strange and interesting that I didn't really expect from the Go compiler. I have a main which uses a structure created in a package, which contains a whole load of references to other packages. What I discovered is that even though only one of these includ

[go-nuts] Go language survey tool

2019-06-28 Thread Michael Jones
Announcing *Survey*, a general purpose utility that may be of interest to those curious about how how the Go language is used at a token level. When I posted a survey of the Go 1.13 source tree and of the Go Corpus a week ago, several people wrote and asked that I share. The program at that time wa

[go-nuts] go build vs go install in cgo

2019-06-28 Thread Nitish Saboo
HI , In case of cgo, does go build -v -x main.go and go install -v -x main.go perform the same operation except that go install pushes the binary under /bin. Is the binary that gets created is same ? Thanks, Nitish -- You received this message because you are subscribed to the Google Groups