commit | 7c7cecc1846aaaa0ce73931644fe1df2b4559e09 | [log] [tgz] |
---|---|---|
author | Dave Brophy <dave@brophy.uk> | Tue Aug 28 18:13:40 2018 +0000 |
committer | Rob Pike <r@golang.org> | Tue Aug 28 20:15:15 2018 +0000 |
tree | b600b7702a813600bf4634734ae3ea93c8b38e25 | |
parent | cb7f9ec4b71e81760fa36ebff60a7e41a07df238 [diff] |
fmt: fix incorrect format of whole-number floats when using %#v This fixes the unwanted behaviour where printing a zero float with the #v fmt verb outputs "0" - e.g. missing the trailing decimal. This means that the output would be interpreted as an int rather than a float when parsed as Go source. After this change the the output is "0.0". Fixes #26363 Change-Id: Ic5c060522459cd5ce077675d47c848b22ddc34fa GitHub-Last-Rev: adfb061363f0566acec134c81be9a3dcb1f4cac8 GitHub-Pull-Request: golang/go#26383 Reviewed-on: https://go-review.googlesource.com/123956 Reviewed-by: Daniel Martà <mvdan@mvdan.cc> Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Daniel Martà <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.