[go-nuts] Is there a bug in path.Dir?

2016-06-19 Thread 18126523585
In windows platform, path.Dir and path.Base can't get the correct result. The test code is like this: func main() { filename := "F:\\Test\\conf\\rkc1" i := strings.LastIndex(filename, string(filepath.Separator)) fmt.Println("dir1:", string(filename[:i+1]))

[go-nuts] Re: Discussion on "Vendoring edge case, critical problem"

2016-06-19 Thread Dave Cheney
If you mean forking their dependencies and rewiring their import paths, that is a possibility. But it leaves consumers of those packages in the same position as the thread the OP referenced because the same code is now known by two distinct import paths breaking type equality. -- You

Re: [go-nuts] Using wss with Gorilla github.com/gorilla/websocket

2016-06-19 Thread Shawn Milochik
You will need a domain name for WSS/TLS. The difference between WS and WSS is as simple as using ListenAndServeTLS instead of ListenAndServe. You can even have an 'if' statement to serve either, so you can more easily test during development. https://golang.org/pkg/net/http/#ListenAndServeTLS

[go-nuts] Re: Discussion on "Vendoring edge case, critical problem"

2016-06-19 Thread Peter Kleiweg
Libraries can vendor in the directory "internal"? -- 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,

Re: [go-nuts] Re: Currying in Go

2016-06-19 Thread Jesper Louis Andersen
On Sat, Jun 18, 2016 at 5:32 AM, Tyler Compton wrote: > I don't pretend to be proficient in this realm of functional programming, > but I would be very surprised if this is valuable in a language like Go > that can and does hold state. In functional languages, it is often

[go-nuts] Re: Currying in Go

2016-06-19 Thread Christoph Berger
> this seems like an eyesore and maintenance concern. (...) it does cause me to hear code review sirens going off in the distance. Then why would you want to use currying in Go at all? What's the point of being able to write f(1)(2)(3) instead of f(1,2,3) *in a non-functional language?*

[go-nuts] Unmarshalling and tags

2016-06-19 Thread 'Mihai B' via golang-nuts
Hi there, I have a struct that needs to be marshalled/unmarshalled using various serialization formats(xml, json, name/value). The tags start to represent a considerable effort[0] so I'm wondering if this is a common use case and if a change[1] to the encoding packages to specify the tag

[go-nuts] Re: How to manage a web portal with multiple services without stopping and restarting everything at each release/fix?

2016-06-19 Thread Simon Ritchie
I think you will be hard put to match the performance of a PHP application on restart, and it may be faster in general. I've always assumed that this is due in part to the fact that the app is embedded in the web server and in part to the essential simplicity of the framework - PHP doesn't do

[go-nuts] WebAssembly as a target

2016-06-19 Thread 'Mihai B' via golang-nuts
I don't think we can expect anything before wasm supports GC (i.e. Phase 3 on wasm roadmap). Once GC is supported(not very soon) Go could be compiled through llgo[0]. One issue could be the binary size(.i.e due /reflect) - Mihai [0] https://llvm.org/svn/llvm-project/llgo/trunk/README.TXT --