Re: [go-nuts] How can I fetch the default locale (server locale not from the request) in Golang

2018-02-16 Thread uwe . dauernheim
Java’s Locale.getDefault returns (if not overridden) the values from the system property “user.language” and “user.region”. If these are not set, it simply returns “en”. See http://hg.openjdk.java.net/jdk8u/jdk8u60/jdk/file/935758609767/src/share/classes/java/util/Locale.java For Linux: These s

Re: [go-nuts] Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Uwe Dauernheim
outcome instead? I, for one, fail to spot where the > perceived problem is (when reading it on the phone). > > On Fri, Dec 30, 2016, 17:26 Uwe Dauernheim > wrote: > >> It seem a float64 of value 0.0 as types interface{} can't be compared >> equal to 0 in an exhaustiv

[go-nuts] Re: Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Uwe Dauernheim
A similarly unexpected behaviour occurs for int: https://play.golang.org/p/NP8_xHc1Rv On Friday, December 30, 2016 at 5:26:51 PM UTC+1, Uwe Dauernheim wrote: > > It seem a float64 of value 0.0 as types interface{} can't be compared > equal to 0 in an exhaustive case clause type li

[go-nuts] Unexpected type switch case listing & equality behaviour for float64

2016-12-30 Thread Uwe Dauernheim
It seem a float64 of value 0.0 as types interface{} can't be compared equal to 0 in an exhaustive case clause type list, but can be compared equal in almost any other scenario. https://play.golang.org/p/t2u2GGp565 I find this unexpected. Could someone explain how case clause type lists in type

[go-nuts] Using xml.Encoder.Encode over xml.Encoder.EncodeElement

2016-10-17 Thread Uwe Dauernheim
Is there a downside in using `xml.Encode` instead of `xml.EncodeElement` when implementing the `xml.Marshaler` interface? I see in the documentation: Using start as the element tag is not required, but doing so will enable Unmarshal to match the XML elements to the correct struct field. Bu

[go-nuts] Re: Go plugin for IntelliJ update with support for 2016.2 IDEs and a lot more

2016-07-21 Thread Uwe Dauernheim
Great progress, thanks! It seems gofmt-on-save is (still) not available. I know of the workarounds like the file change watcher, gofmt-on-commit, and multi-assigned keyboard shortcuts. But could you explain if the problem exists generally because of IntelliJ's auto-save feature or is the gofmt-