[go-nuts] Arguments for writing fast, high-load servers in Go instead of Scala?

2017-02-17 Thread Will Faught
I want to make the case to a software architect where I work that we should write some fast, high-load servers we need in Go rather than Scala. What pragmatic arguments should I use? Note that the architect isn't against ever using Go; the question is whether to use Go now, for these servers

[go-nuts] Re: Why Go doesn't see my local package?

2017-02-17 Thread fsn761304
On Friday, February 17, 2017 at 11:00:41 PM UTC+4, Diego Medina wrote: > > Hi, > > I think you pasted the same content to test.go as well as second.go > > in any case, if you use go run, you need to specify all the files involved: > > go run test.go second.go > > should do the trick > > That

Re: [go-nuts] Any plans to update golang/mock?

2017-02-17 Thread roger peppe
If I need to fake something out, I generally write a little mock type from scratch. If there are a bunch of methods that are required for the interface type but I know will never be called, then there's always the neat trick of embedding a value of the required interface type inside a struct type

Re: [go-nuts] Early hooking runtime - making libcontainer cross compilable

2017-02-17 Thread Ian Lance Taylor
On Fri, Feb 17, 2017 at 3:22 PM, Steven Hartland wrote: > > That said after fork we only have a single thread, so it should be possible > to perform these actions safely if it where possible to run arbitrary > actions via SysProcAttr and care was taken. We are never going

Re: [go-nuts] Early hooking runtime - making libcontainer cross compilable

2017-02-17 Thread Steven Hartland
On 17/02/2017 22:36, Ian Lance Taylor wrote: On Fri, Feb 17, 2017 at 1:55 PM, Steven Hartland wrote: Recently we started adding support to our systems for opencontainers via libcontainer however due to its use of C code for the early hooking this means we now can't

Re: [go-nuts] Early hooking runtime - making libcontainer cross compilable

2017-02-17 Thread Ian Lance Taylor
On Fri, Feb 17, 2017 at 1:55 PM, Steven Hartland wrote: > Recently we started adding support to our systems for opencontainers via > libcontainer however due to its use of C code for the early hooking this > means we now can't cross-compile our code any more, which is a

Re: [go-nuts] How do you implement and use Context.Done?

2017-02-17 Thread Ian Lance Taylor
On Fri, Feb 17, 2017 at 1:34 PM, wrote: > I'm not sure how to implement and use the Done function and its returned > channel for contexts. > https://golang.org/pkg/context/#Context > > The comments say to refer to https://blog.golang.org/pipelines, but I didn't > see any

Re: [go-nuts] Go Roadmap

2017-02-17 Thread Tharaneedharan Vilwanathan
Great! Thanks, Ian! Regards dharani On Fri, Feb 17, 2017 at 12:40 PM, Ian Lance Taylor wrote: > On Fri, Feb 17, 2017 at 12:28 PM, Tharaneedharan Vilwanathan > wrote: > > > > I have trouble getting to know whats coming up in future Go releases. > > > > Can

[go-nuts] Early hooking runtime - making libcontainer cross compilable

2017-02-17 Thread Steven Hartland
Recently we started adding support to our systems for opencontainers via libcontainer however due to its use of C code for the early hooking this means we now can't cross-compile our code any more, which is a PITA. The main reason for this is the early hooking required to perform setns as

[go-nuts] How do you implement and use Context.Done?

2017-02-17 Thread so . query
I'm not sure how to implement and use the Done function and its returned channel for contexts. https://golang.org/pkg/context/#Context The comments say to refer to https://blog.golang.org/pipelines, but I didn't see any example there. Can you provide an example of how to implement a context

Re: [go-nuts] API call fails

2017-02-17 Thread Janne Snabb
Your client is working correctly but the server at port 11215 is offering a wrong certificate. Configure the server to offer a certificate for myDomain.com instead of offering a certificate for anotherDomain.com. Alternatively you can work around the issue by setting InsecureSkipVerify in your

Re: [go-nuts] Go Roadmap

2017-02-17 Thread Ian Lance Taylor
On Fri, Feb 17, 2017 at 12:28 PM, Tharaneedharan Vilwanathan wrote: > > I have trouble getting to know whats coming up in future Go releases. > > Can someone tell me where to find this info? > > For example, where can I see whats new in Go 1.9? See this thread in golang-dev:

[go-nuts] Go Roadmap

2017-02-17 Thread Tharaneedharan Vilwanathan
Hi All, I have trouble getting to know whats coming up in future Go releases. Can someone tell me where to find this info? For example, where can I see whats new in Go 1.9? Thanks dharani -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: Can anyone provide an example or stopping and/or starting an established Windows service?

2017-02-17 Thread akcorr
I copied your code from playground. I will make that change and let you know. On Friday, February 17, 2017 at 2:07:38 PM UTC-5, Egon wrote: > > Is your code up to date? > What happens, if you do: > fmt.Println(service, err) > fmt.Println(service.Config()) > > On Friday, 17 February 2017

[go-nuts] Re: Can anyone provide an example or stopping and/or starting an established Windows service?

2017-02-17 Thread Egon
Is your code up to date? What happens, if you do: fmt.Println(service, err) fmt.Println(service.Config()) On Friday, 17 February 2017 20:42:00 UTC+2, akc...@gmail.com wrote: > > What's driving me crazy is that if I change the name of the service being > passed to something like

[go-nuts] Re: Why Go doesn't see my local package?

2017-02-17 Thread Diego Medina
Hi, I think you pasted the same content to test.go as well as second.go in any case, if you use go run, you need to specify all the files involved: go run test.go second.go should do the trick That being said, unless you are writing small scripts using Go, I would not recommend doing this,

[go-nuts] Re: Can anyone provide an example or stopping and/or starting an established Windows service?

2017-02-17 Thread akcorr
What's driving me crazy is that if I change the name of the service being passed to something like "thisdoesnotexist" I don't get an error. I would expect to see a error when it reaches this line in the function: service, err := manager.OpenService(name) if err != nil { return

[go-nuts] Any plans to update golang/mock?

2017-02-17 Thread msabramo
Just curious if anyone is planning to update golang/mock (https://github.com/golang/mock), since it has a bunch of open PRs and hasn't had a commit since Jan. 2016. Or maybe it's not a preferred tool in the Golang community anymore? Is there some other tool that folks recommend for mocking

[go-nuts] Re: Can anyone provide an example or stopping and/or starting an established Windows service?

2017-02-17 Thread Egon
Try this: https://play.golang.org/p/b5EPbHD6Bm I'm guessing you are getting "Access Denied" and not seeing the error. + Egon On Friday, 17 February 2017 18:07:34 UTC+2, akc...@gmail.com wrote: > > I've just started learning the language and went through some of the > packages that deal with

[go-nuts] Can anyone provide an example or stopping and/or starting an established Windows service?

2017-02-17 Thread akcorr
I've just started learning the language and went through some of the packages that deal with file operations and that went well. Has anyone had experience with starting and stopping windows services? I went and ran a go get on package: "golang.org/x/sys/windows/svc/mgr". Looking around and

[go-nuts] Re: Organizing a lot of implementations for single interface

2017-02-17 Thread Henry
In addition to Kevin's excellent answer, I may as well add that you should probably attempt to simplify your codes first. Maintaining hundreds of implementation is a nightmare. You could probably convert those hundreds of items into data and have only one implementation whose behavior changes

[go-nuts] Re: Go 1.8 : cmd/go : test timed out after 3m0s

2017-02-17 Thread peterGo
Peter, You can get a complete Go installation by running ./make.bash. Running ./all.bash adds a lot of testing for Go compiler and standard library developers. Peter On Friday, February 17, 2017 at 6:28:22 AM UTC-5, Peter Kleiweg wrote: > > Installing Go 1.8 with: > > git pull > git

[go-nuts] Updated list of interfaces

2017-02-17 Thread Michel Casabianca
Hi Gophers, I have updated the list of Go interfaces you may find at http://sweetohm.net/article/go-interfaces.en.html New interfaces in this 1.8 release are the following: - ConnBeginTx (database/sql/driver): https://github.com/golang/go/ blob/go1.8/src/database/sql/driver/driver.go#L186 -

[go-nuts] API call fails

2017-02-17 Thread Sovon Nath
Hi - I am trying to call a restful API using a certificate. The pem file I have is of the format: -BEGIN RSA PRIVATE KEY- data is here -END RSA PRIVATE KEY- -BEGIN CERTIFICATE- data is here -END CERTIFICATE- -BEGIN CERTIFICATE- data is here

Re: [go-nuts] Distribution of Go by ActiveState

2017-02-17 Thread Ian Lance Taylor
On Fri, Feb 17, 2017 at 5:55 AM, wrote: > > allthough I'm not an Open Source or licencing expert I wonder if the planned > Go distribution with commercial support is legal by Go's license terms: > Here's a link to it: http://www.activestate.com/go > > I just wanted to

Re: [go-nuts] Distribution of Go by ActiveState

2017-02-17 Thread Jakob Borg
Releasing something based on the regular Go distribution and charging for commercial support of it should be perfectly fine. If they're undertaking maintenance of otherwise old and unsupported releases this might even add actual value for someone. What other value might be added in the Business

Re: [go-nuts] Go 1.8 : cmd/go : test timed out after 3m0s

2017-02-17 Thread Ian Lance Taylor
On Fri, Feb 17, 2017 at 3:28 AM, Peter Kleiweg wrote: > Installing Go 1.8 with: > > git pull > git checkout go1.8 > cd src > GOROOT_BOOTSTRAP=/path/to/go1.4 ./all.bash > > I get this: > > panic: test timed out after 3m0s > (stacktrace) > FAIL

Re: [go-nuts] Re: Google Grumpy (Python->Go)

2017-02-17 Thread paul
On Saturday, February 4, 2017 at 5:35:33 AM UTC+1, Dylan Trotter wrote: > > The compiler cannot yet run under Grumpy because it uses standard > libraries that aren't yet supported. The most substantial unsupported > library is the ast module. Once https://github.com/google/grumpy/pull/216 > is

[go-nuts] Distribution of Go by ActiveState

2017-02-17 Thread norbert . fuhs . xyz
Hi, allthough I'm not an Open Source or licencing expert I wonder if the planned Go distribution with commercial support is legal by Go's license terms: Here's a link to it: http://www.activestate.com/go I just wanted to let the Go Community know about this. -- You received this message

Re: [go-nuts] Re: Go on AIX

2017-02-17 Thread Tony . Reix
Hi, We are making progress with GCC Go on AIX 6.1, with GCC 7 snapshot. Current issues are: - '$' character in assembler symbols. Replacing '$' by '_' is not a complete solution yet. Requires more study. - go command failure, due to: 'FFI Go closure' not being implemented on AIX yet. - still

[go-nuts] [ANN] s5cmd - Parallel S3 and local fs execution tool

2017-02-17 Thread Kemal Hadimli
Hi Finally released our S3 cli tool - s5cmd! Located at https://github.com/peakgames/s5cmd We've been using it on daily operations for a few months now, constantly improving. I suspect there might be a few bugs left, but looking good enough for a release. Suggestions are welcome, either from

[go-nuts] Go 1.8 : cmd/go : test timed out after 3m0s

2017-02-17 Thread Peter Kleiweg
Installing Go 1.8 with: git pull git checkout go1.8 cd src GOROOT_BOOTSTRAP=/path/to/go1.4 ./all.bash I get this: panic: test timed out after 3m0s (stacktrace) FAILcmd/go 193.895s The problem is I am installing this on a system with a very slow, network file

[go-nuts] Why Go doesn't see my local package?

2017-02-17 Thread fsn761304
In /etc/profile I have: export PATH=$PATH:/usr/local/go/bin export GOPATH=$HOME/work export GOROOT=/usr/local/go I have 2 source files: test.go (main) and second.go They located in /home/u001/work/src/github.com/user/test/ When I'm running go run test.go from test it gives me: test.go:5:2:

[go-nuts] Re: Organizing a lot of implementations for single interface

2017-02-17 Thread Luca Looz
I'm starting now the project and i'm seeking advices on how to organize packages. Should i use a separate package for each implementation to avoid visibility issues with constants and other global vars that are internal for only a single implementation? Il giorno venerdì 17 febbraio 2017