Re: [go-nuts] Compiling C files conditionally

2016-07-29 Thread Seb Binet
Yes, probably. Please do file an issue on github, thanks. -s sent from my droid On Jul 30, 2016 4:33 AM, wrote: > Hi Sebastien, > > Thanks for the response but this does not work completely. The issue is > demonstrated in a package here: > > github.com/satyamsi/cbuilds/a > > One file a.go buil

[go-nuts] Re: return statement

2016-07-29 Thread Dave Cheney
*s++ is a statement, not an expression. You cannot write x := *s++ so you also cannot write return *s++ On Saturday, 30 July 2016 12:32:03 UTC+10, CH S Phani wrote: > > Hello All, > > The below statement does not compile in Go language. The compilation error > is "syntax error: unexpected ++ a

[go-nuts] Re: return statement

2016-07-29 Thread Jason E. Aten
Statements and expressions are two different things. An expression has a value, with a type like "int", that can be returned. So it is fine to return the expression "*s", because it has a value. A statement doesn't have a value, so it can't be returned. The ++ and -- operators are statements in

Re: [go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Dave Cheney
That documention is incorrect. The language spec assigns no meaning to the import path. The complier assigns the meaning that a compiled package must exists in a subdirectory with a name that matches the import part, plus .a, in a path provided by the -I flag. The go tool goes further to inter

Re: [go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Gregory Golberg
That's not the case, though, "First, the import path is derived in an known way from the URL of the source code. For Bitbucket, GitHub, Google Code, and Launchpad, the root directory of the repository is identified by the repository's main URL, without the http:// prefix." https://golang.org/do

Re: [go-nuts] Re: [ANN] A GC-friendly and fast StatsD client

2016-07-29 Thread mike
Hi Alexandre, If I .Clone() a statsd.Client, say in a go-routine, do I need to .Close() the clone? Thank you, Mike On Monday, March 21, 2016 at 7:32:24 AM UTC-5, Alexandre Cesaro wrote: > > I just released statsd.v2 . > > The API is more flexible: it now

Re: [go-nuts] Compiling C files conditionally

2016-07-29 Thread satyam
Hi Sebastien, Thanks for the response but this does not work completely. The issue is demonstrated in a package here: github.com/satyamsi/cbuilds/a One file a.go build for linux and has an import "C" - this works fine. On non-linux, a_non_linux.go gets used. As this file doesnt use anything C

[go-nuts] Re: [ANN] Configuration library

2016-07-29 Thread satyam
Docopt seems awesome. https://github.com/docopt/docopt.go Satyam On Tuesday, July 26, 2016 at 11:16:03 PM UTC-7, Gerardo Oscar JT wrote: > > Maybe too simple, maybe there are several solutions, but here > https://github.com/fulldump/goconfig is a configuration library to avoid > the over-verbo

[go-nuts] Using golang/cmd/pprof/internal in a Go program, and/or UNIX socket support in `go tool pprof`?

2016-07-29 Thread nathan.leclaire via golang-nuts
Hi all, I am interested in doing performance profiling on the Docker daemon using the existing pprof tools and/or code inside of the internal packages of commands, and I was hoping to get some guidance on the challenges I've encountered attempting this. The Docker daemon (a Go program) exposes

[go-nuts] html/template function not defined

2016-07-29 Thread alex . breadman
func encodeJSON(data interface{}) template.JS { a, err := json.Marshal(data) if err != nil { panic(err) } return template.JS(a) } // code for rendering ELEMENT func (ele *ELEMENT) Render() ([]byte, error) { // init map of functions available to use within delimiters if funcMap == nil { funcMap

[go-nuts] return statement

2016-07-29 Thread CH S Phani
Hello All, The below statement does not compile in Go language. The compilation error is "syntax error: unexpected ++ at end of statement" return *s++ The function containing this statement is as below func Incr(s *int) int { return *s++ //the purpose is to increment the parameter passed by 1.

Re: [go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Michael Jones
Go is strongly opinionated about strategies (reduce errors, simplify structure, rapid builds, memory safety, etc.) but is agnostic about most everything else. Even if the Go team uses CPU X, OS Y, VCS Z, that’s just an example from a multiplicity of present and future choices. The design of Go n

Re: [go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Matt Harden
The go tool works with other VCSes, such as mercurial, bitbucket and subversion. On Fri, Jul 29, 2016 at 6:47 PM Chad wrote: > > On Saturday, July 30, 2016 at 1:43:36 AM UTC+2, Dave Cheney wrote: >> >> How about a tag? which developers should be doing as part of any mature >> release process. >

[go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Chad
On Saturday, July 30, 2016 at 1:43:36 AM UTC+2, Dave Cheney wrote: > > How about a tag? which developers should be doing as part of any mature > release process. Sure, a tag may be possible. I thought timestamp because it is easily generated by a machine as well as parsable, with a well define

Re: [go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Gregory Golberg
But it's already a given that Go is fairly opinionated in favor of github, no? On Friday, July 29, 2016 at 5:52:25 PM UTC-7, Matt Harden wrote: > > I like submodules, but they do only work when you're using git and only > vendoring projects that also use git. > > On Fri, Jul 29, 2016 at 4:44 PM

Re: [go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Matt Harden
I like submodules, but they do only work when you're using git and only vendoring projects that also use git. On Fri, Jul 29, 2016 at 4:44 PM Gregory Golberg wrote: > What is wrong with using git submodules inside the vendor directory, > submodules pointing to the tag/revision of your choice? >

[go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Dave Cheney
How about a tag? which developers should be doing as part of any mature release process. -- 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...@

[go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Gregory Golberg
What is wrong with using git submodules inside the vendor directory, submodules pointing to the tag/revision of your choice? On Friday, July 29, 2016 at 10:24:20 AM UTC-7, Chad wrote: > > To be more precise, I am not thinking about a package manager but rather > more of a kind of package registr

Re: [go-nuts] Re: ANNOUNCE: gini

2016-07-29 Thread Justin Israel
On Sat, 30 Jul 2016, 10:01 AM Justin Israel wrote: > > > On Sat, 30 Jul 2016, 2:22 AM Scott Cotton wrote: > >> Thanks. >> >> Out of curiosity, are you using sat solvers in visual effects pipelines? >> > > I was using it for a new version of the package dependency resolver > component of our env

Re: [go-nuts] Re: ANNOUNCE: gini

2016-07-29 Thread Justin Israel
On Sat, 30 Jul 2016, 2:22 AM Scott Cotton wrote: > Thanks. > > Out of curiosity, are you using sat solvers in visual effects pipelines? > I was using it for a new version of the package dependency resolver component of our environment management system. I was able to model the entire "repositor

[go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Chad
To be more precise, I am not thinking about a package manager but rather more of a kind of package registration interface. A bit like godoc. But working by submissions of vcs hosts links (thus allowing mirror links). Backward compatibility requirements are making things simple already: the late

[go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Chad
To be more precise, I am not thinking about a package manager but rather more of a kind of package registration interface. A bit like godoc. But working by submissions of vcs links (thus allowing mirror links). Backward compatibility requirements are making things simple already: the latest "re

[go-nuts] Re: How do i create a fake drive that shows up in windows explorer?

2016-07-29 Thread Daniel Theophanes
If you're on windows you either want https://dokan-dev.github.io/ which shows up as a native drive or webdav https://godoc.org/golang.org/x/net/webdav which shows up as a network drive. On Thursday, July 28, 2016 at 4:31:22 PM UTC-7, Justin C wrote: > > Good afternoon, > I am trying to create a

[go-nuts] World Famous Gopher Hole Museum: Alberta Canada

2016-07-29 Thread DrGo
Gophers in the news: http://www.cbc.ca/shortdocs/shorts/world-famous-gopher https://www.youtube.com/watch?v=QGT8XLrYnio -- 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 em

[go-nuts] Re: What lead to the versionning debate?

2016-07-29 Thread Chad
Oh I see now. I guess we need something inbetween go get and the different vcs to register and timestamp a package each time it is declared as having been updated. (would still be vcs agnostic though, it's just to timestamp the package files) Would make releasing a package a bit more of a manua

[go-nuts] Re: Will too many cases in a select block affect program efficiency much?

2016-07-29 Thread digg
On Friday, July 29, 2016 at 5:54:15 AM UTC+8, Dave Cheney wrote: > > How many case blocks are you considering? There is some setup cost that is > linear with the number of selectable channels, but as a select stmt usually > blocks the setup cost is not usually considered the limiting factor.

[go-nuts] Re: How do i create a fake drive that shows up in windows explorer?

2016-07-29 Thread Justin C
Thank you for your help! I'll look into fuse. -- 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 ht

[go-nuts] Re: Server response time hike.

2016-07-29 Thread James Bardin
The open connections are either totally irrelevant, or are the _result_ of whatever is causing the response time to increase. Are you setting a reasonable ReadTimeout and WriteTimeout on your server? Maybe slow/stalled clients are holding server resources? On Friday, July 29, 2016 at 10:22:51

[go-nuts] Re: [ANN] Configuration library

2016-07-29 Thread Gerardo Oscar JT
Wow incredible huge library with a lot of options, even with its own parser! It is also possible to build hierarchical commands (like git) I see that more like a thing to be human friendly, the human is constantly interacting with commands. goconfig (well, this goconfig, there are 39 repositories

[go-nuts] Server response time hike.

2016-07-29 Thread Manideep Attanti
The pprof stats show around 900 go-routines and most of them are waiting on read request. This is causing server response time to shoot up. Any insights on how to debug this. goroutine 1842715 [IO wait, 1 minutes]: net.runtime_pollWait(0x7f753ba71ef0, 0x72, 0xc8270e9000) /root/.gvm/gos/g

[go-nuts] Re: ANNOUNCE: gini

2016-07-29 Thread Scott Cotton
Thanks. Out of curiosity, are you using sat solvers in visual effects pipelines? Scott Le vendredi 29 juillet 2016 00:18:14 UTC+2, Justin Israel a écrit : > > Neat. I had been using pigosat for > a project. It vendors the picosat C dependency right in.

[go-nuts] Re: [ANN] Configuration library

2016-07-29 Thread Tong Sun
On Wednesday, July 27, 2016 at 3:19:39 PM UTC-4, Gerardo Oscar JT wrote: > > ... I have been looking at some of them and probably fulldump/goconfig has > the best logo :) And also it is the most generic and simpler one with > default values > json values > cli values precedence. > Not trying

Re: [go-nuts] Re: http response issue with leaking handles

2016-07-29 Thread James Bardin
On Fri, Jul 29, 2016 at 2:01 AM, wrote: > Thanks James, are there any golang tools which could have caught this > issue. I know go vet didnt. Caught the issue of using the first odd pattern for closing the response Body? There's no tool that can detect general logic errors in your program, but

[go-nuts] Re: Go package management proposal process

2016-07-29 Thread omarshariffdontlikeit
This is great news! For me this was the last wrinkle in the Go eco system, glad to here its getting an official solution with some talented people involved. Kudos to everyone involved in this. On Friday, July 29, 2016 at 8:46:01 AM UTC+1, Peter Bourgon wrote: > > Hello, > > For well over a year

Re: [go-nuts] How to get struct of function

2016-07-29 Thread Peter Waller
Try this: https://play.golang.org/p/zJa8N24nxi -- package main import ( "fmt" "log" "reflect" ) func main() { var controller interface{} = Test.IsWorking funcTyp := reflect.TypeOf(controller) structTyp := funcTyp.In(0) newValue := reflect.New(structTyp).Interface() fmt.Printf("%#+v", newValue)

[go-nuts] Go package management proposal process

2016-07-29 Thread Peter Bourgon
Hello, For well over a year, a group of dedicated Gophers have been discussing the package management situation on a dedicated mailing list, in Slack #vendor, and several communication channels. A few tools have emerged from those broad conversations, including Glide, govendor, gb, and the SAT sol

Re: [go-nuts] Compiling C files conditionally

2016-07-29 Thread Seb Binet
Satyam, On Fri, Jul 29, 2016 at 3:25 AM, wrote: > Hi Folks, > > If I need to compile c files in a package conditionally based on the OS > that I am running on, seems like +build is the right way to do it. I can > have two versions of the file: > > somefile_linux.go which has // +build linux and