X7ROOT File Manager
Current Path:
/opt/golang/1.19.4/src/cmd/gofmt/testdata
opt
/
golang
/
1.19.4
/
src
/
cmd
/
gofmt
/
testdata
/
📁
..
📄
comments.golden
(76 B)
📄
comments.input
(76 B)
📄
composites.golden
(2.54 KB)
📄
composites.input
(3.16 KB)
📄
crlf.golden
(230 B)
📄
crlf.input
(243 B)
📄
emptydecl.golden
(140 B)
📄
emptydecl.input
(148 B)
📄
go2numbers.golden
(1.9 KB)
📄
go2numbers.input
(1.96 KB)
📄
import.golden
(2.1 KB)
📄
import.input
(2.1 KB)
📄
issue28082.golden
(249 B)
📄
issue28082.input
(447 B)
📄
ranges.golden
(307 B)
📄
ranges.input
(304 B)
📄
rewrite1.golden
(248 B)
📄
rewrite1.input
(248 B)
📄
rewrite10.golden
(350 B)
📄
rewrite10.input
(350 B)
📄
rewrite2.golden
(407 B)
📄
rewrite2.input
(406 B)
📄
rewrite3.golden
(422 B)
📄
rewrite3.input
(422 B)
📄
rewrite4.golden
(1.04 KB)
📄
rewrite4.input
(1.12 KB)
📄
rewrite5.golden
(446 B)
📄
rewrite5.input
(538 B)
📄
rewrite6.golden
(463 B)
📄
rewrite6.input
(463 B)
📄
rewrite7.golden
(466 B)
📄
rewrite7.input
(472 B)
📄
rewrite8.golden
(292 B)
📄
rewrite8.input
(300 B)
📄
rewrite9.golden
(228 B)
📄
rewrite9.input
(238 B)
📄
slices1.golden
(927 B)
📄
slices1.input
(957 B)
📄
stdin1.golden
(32 B)
📄
stdin1.input
(32 B)
📄
stdin2.golden
(101 B)
📄
stdin2.input
(101 B)
📄
stdin3.golden
(101 B)
📄
stdin3.input
(96 B)
📄
stdin4.golden
(38 B)
📄
stdin4.input
(39 B)
📄
stdin5.golden
(55 B)
📄
stdin5.input
(54 B)
📄
stdin6.golden
(199 B)
📄
stdin6.input
(217 B)
📄
stdin7.golden
(342 B)
📄
stdin7.input
(296 B)
📄
tabs.golden
(480 B)
📄
tabs.input
(449 B)
📄
typealias.golden
(365 B)
📄
typealias.input
(360 B)
📄
typeparams.golden
(680 B)
📄
typeparams.input
(677 B)
📄
typeswitch.golden
(1.43 KB)
📄
typeswitch.input
(1.43 KB)
Editing: rewrite4.input
//gofmt -r=(x)->x // Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Rewriting of parenthesized expressions (x) -> x // must not drop parentheses if that would lead to // wrong association of the operands. // Was issue 1847. package main // From example 1 of issue 1847. func _() { var t = (&T{1000}).Id() } // From example 2 of issue 1847. func _() { fmt.Println((*xpp).a) } // Some more test cases. func _() { _ = (-x).f _ = (*x).f _ = (&x).f _ = (!x).f _ = (-x.f) _ = (*x.f) _ = (&x.f) _ = (!x.f) (-x).f() (*x).f() (&x).f() (!x).f() _ = (-x.f()) _ = (*x.f()) _ = (&x.f()) _ = (!x.f()) _ = ((-x)).f _ = ((*x)).f _ = ((&x)).f _ = ((!x)).f _ = ((-x.f)) _ = ((*x.f)) _ = ((&x.f)) _ = ((!x.f)) ((-x)).f() ((*x)).f() ((&x)).f() ((!x)).f() _ = ((-x.f())) _ = ((*x.f())) _ = ((&x.f())) _ = ((!x.f())) _ = -(x).f _ = *(x).f _ = &(x).f _ = !(x).f _ = -x.f _ = *x.f _ = &x.f _ = !x.f _ = -(x).f() _ = *(x).f() _ = &(x).f() _ = !(x).f() _ = -x.f() _ = *x.f() _ = &x.f() _ = !x.f() }
Upload File
Create Folder