commit | 5cc030aa1996762e48ce446001078ce6447f105e | [log] [tgz] |
---|---|---|
author | Alberto Donizetti <alb.donizetti@gmail.com> | Mon Jul 27 14:42:06 2020 +0200 |
committer | Alberto Donizetti <alb.donizetti@gmail.com> | Sun Sep 06 20:23:50 2020 +0000 |
tree | 3c1c90c008a864c2e073174e8d7b22fb950f4b0e | |
parent | 617f2c3e35cdc8483b950aa3ef18d92965d63197 [diff] |
go/ast: note that in BasicLit CHARs and STRINGs are quoted The Value field of ast.BasicLit is a string field holding the literal string. For CHARs and STRINGs, the BasicLit.Value literal includes quotes, so to use the value in practise one will often need to Unquote it. Since this is a common gotcha (I've been bitten by this a few times), document it, and suggest the use of the strconv.Unquote functions. Fixes #39590 Change-Id: Ie3e13f5a2a71bb1b59e03bc5b3a16d8e2e7c01d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/244960 Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
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.