[go-nuts] unexpected strconv.FormatFloat behaviour

2017-07-01 Thread Dan Kortschak
Is this expected: ``` package main import ( "fmt" "strconv" ) func main() { fmt.Print(strconv.FormatFloat(0.5, 'f', 0, 64)) } ``` ``` 0 ``` https://play.golang.org/p/HEyxpGPrX3 This is truncating, not rounding. -- You received this message because you are subscribed

[go-nuts] Just launched a new Go Community Site

2017-07-01 Thread brian
LinkLog to post Updates, New libraries and More. Feedback welcome http://golangflow.io/ -- 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

Re: [go-nuts] time/format: how to add custom formats (24-hour without 0 padding)

2017-07-01 Thread David Collier-Brown
This looks good: if there is a mechanism to align times with language, it should be the implementation of Canadian French (along with things like circiumflex-E) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] Re: Explain the meaning of iota

2017-07-01 Thread Scott Pakin
On Friday, June 30, 2017 at 9:28:50 PM UTC-6, Manohar Reddy wrote: > > `iota` is golnag's enum. I've seen this code in Wikipedia. But I did not > understand it. Can someone please explain this code? > In the first line of the const block, iota is 0, and this is assigned to "_" (i.e.,

Re: [go-nuts] time/format: how to add custom formats (24-hour without 0 padding)

2017-07-01 Thread Jakob Borg
I think this would be difficult to do correctly, given the (very unusual) choice of using an example time as the format string. I don’t see an obvious way of expressing the example hour (15) in a way that would imply “24 hour format, but no zero padding”. //jb On 1 Jul 2017, at 19:01,

[go-nuts] Go type chart

2017-07-01 Thread Tong Sun
Hi, Any exiting tools out there for Go type chart, to visualize the relationships of different user defined Go types? Thx. -- 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,

Re: [go-nuts] time/format: how to add custom formats (24-hour without 0 padding)

2017-07-01 Thread ikedamdam
Thanks for the answer. I believe it would be nice if custom formats can be added by developers. Does it make sense to create a pull request for time/format to allow developers add custom formats? Custom formats can be defined if I could extend `nextStdChunk` (extracting `std` from layouts) and

Re: [go-nuts] Re: gofmt question

2017-07-01 Thread Shawn Milochik
On Sat, Jul 1, 2017 at 11:40 AM, Glenn Hancock wrote: > Thanks for the responses. I guess I'll just deal with it. While I can > understand the need to format code the same way, I would rather have my > company policies dictate this instead of the all knowing Google force upon

Re: [go-nuts] Re: gofmt question

2017-07-01 Thread Glenn Hancock
Thanks for the responses. I guess I'll just deal with it. While I can understand the need to format code the same way, I would rather have my company policies dictate this instead of the all knowing Google force upon me what they think is proper. Guess we should get used to the new world

[go-nuts] time/format: how to add custom formats (24-hour without 0 padding)

2017-07-01 Thread ikedamdam
Hello, I want to format times like this (for Canadian French users): 06:00 -> 6:00 15:00 -> 15:00 So I want format hours in 24-hour clock without 0 padding. Unfortunately, predefined formats in time/format provides only 0 padded hours for 24-hour clock. Is there a way to extend time/format

Re: [go-nuts] Re: gofmt question

2017-07-01 Thread Siduri Irudis
Hi, If you add comments to preserve space, then other people who code with you might not be appreciative :> Have a look at git's hooks here: https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks and use those to place your personal formatting code and run Go's formatter. If you use svn or

Re: [go-nuts] No luck running 'go install' from within go program

2017-07-01 Thread Siduri Irudis
Hi Jan, your advice did the trick --- thank you very much :-) Siduri On Sat, Jul 1, 2017 at 9:46 AM, Jan Mercl <0xj...@gmail.com> wrote: > On Sat, Jul 1, 2017 at 5:12 AM wrote: > > > and the golang version is go_project.go >

Re: [go-nuts] No luck running 'go install' from within go program

2017-07-01 Thread Jan Mercl
On Sat, Jul 1, 2017 at 5:12 AM wrote: > and the golang version is go_project.go cmd = exec.Command("go install -x")

[go-nuts] Re: max connections limit lib/pq

2017-07-01 Thread Franco Marchesini
Postgres default max connection is set to 100. https://www.postgresql.org/docs/9.5/static/runtime-config-connection.html max_connections (integer) Determines the maximum number of concurrent connections to the database server. The default is typically 100 connections, but might be less if your