We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated invocations of format.Source alter source:
package main import ( "bytes" "fmt" "go/format" ) func main() { for _, data := range []string{"\n", " "} { data1, err := format.Source([]byte(data)) if err != nil { panic(err) } data2, err := format.Source(data1) if err != nil { panic(err) } if !bytes.Equal(data1, data2) { fmt.Printf("non-idempotent format: %q -> %q -> %q\n", data, data1, data2) } } }
non-idempotent format: "\n" -> "\n\n" -> "\n\n\n\n" non-idempotent format: " " -> "\t " -> "\t\t "
go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64
The text was updated successfully, but these errors were encountered:
May be an issue when using go/format to format partial code snippets, e.g. inside editors.
Sorry, something went wrong.
CL https://golang.org/cl/15154 mentions this issue.
829cc34
No branches or pull requests
Repeated invocations of format.Source alter source:
go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64
The text was updated successfully, but these errors were encountered: