├── .github ├── FUNDING.yml └── workflows │ └── test.yml ├── .gitignore ├── LICENSE ├── README.md ├── go.mod ├── go.sum ├── main.go ├── reduce.go ├── reduce_test.go ├── rules.go ├── testdata ├── bypass-defer │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── bypass-else │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── bypass-go │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── bypass-if │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── compile-crash │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── either-binary │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── inline-block │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── inline-call-anon │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── inline-call-var │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── inline-call │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── inline-case │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── inline-const │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── inline-defs │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── inline-var │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── reduce-slice │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── remove-import │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── remove-index │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── remove-paren │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── remove-recv │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── remove-slice │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── remove-star │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── remove-stmt │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-append-elems │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-binary-ints │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-binary-strs │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-index-complit │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-index-strs │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-len-strs │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-slice-complit │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-slice-strs │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── resolve-unary-ints │ ├── log │ ├── match │ ├── src.go │ └── src.go.min ├── zero-complit │ ├── log │ ├── match │ ├── src.go │ └── src.go.min └── zero-lit │ ├── log │ ├── match │ ├── src.go │ └── src.go.min └── walk.go /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: mvdan 2 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /testdata/*/goreduce_test.go 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/README.md -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/go.sum -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/main.go -------------------------------------------------------------------------------- /reduce.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/reduce.go -------------------------------------------------------------------------------- /reduce_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/reduce_test.go -------------------------------------------------------------------------------- /rules.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/rules.go -------------------------------------------------------------------------------- /testdata/bypass-defer/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-defer/log -------------------------------------------------------------------------------- /testdata/bypass-defer/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/bypass-defer/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-defer/src.go -------------------------------------------------------------------------------- /testdata/bypass-defer/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-defer/src.go.min -------------------------------------------------------------------------------- /testdata/bypass-else/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-else/log -------------------------------------------------------------------------------- /testdata/bypass-else/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/bypass-else/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-else/src.go -------------------------------------------------------------------------------- /testdata/bypass-else/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-else/src.go.min -------------------------------------------------------------------------------- /testdata/bypass-go/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-go/log -------------------------------------------------------------------------------- /testdata/bypass-go/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/bypass-go/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-go/src.go -------------------------------------------------------------------------------- /testdata/bypass-go/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-go/src.go.min -------------------------------------------------------------------------------- /testdata/bypass-if/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-if/log -------------------------------------------------------------------------------- /testdata/bypass-if/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/bypass-if/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-if/src.go -------------------------------------------------------------------------------- /testdata/bypass-if/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/bypass-if/src.go.min -------------------------------------------------------------------------------- /testdata/compile-crash/log: -------------------------------------------------------------------------------- 1 | src.go:4: ExprStmt removed (first try) 2 | gave up after 0 final tries 3 | -------------------------------------------------------------------------------- /testdata/compile-crash/match: -------------------------------------------------------------------------------- 1 | cannot type switch on non-interface value nil 2 | -------------------------------------------------------------------------------- /testdata/compile-crash/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/compile-crash/src.go -------------------------------------------------------------------------------- /testdata/compile-crash/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/compile-crash/src.go.min -------------------------------------------------------------------------------- /testdata/either-binary/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/either-binary/log -------------------------------------------------------------------------------- /testdata/either-binary/match: -------------------------------------------------------------------------------- 1 | nil pointer dereference 2 | -------------------------------------------------------------------------------- /testdata/either-binary/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/either-binary/src.go -------------------------------------------------------------------------------- /testdata/either-binary/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/either-binary/src.go.min -------------------------------------------------------------------------------- /testdata/inline-block/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-block/log -------------------------------------------------------------------------------- /testdata/inline-block/match: -------------------------------------------------------------------------------- 1 | panic: (\(float|\+0\.0) 2 | -------------------------------------------------------------------------------- /testdata/inline-block/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-block/src.go -------------------------------------------------------------------------------- /testdata/inline-block/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-block/src.go.min -------------------------------------------------------------------------------- /testdata/inline-call-anon/log: -------------------------------------------------------------------------------- 1 | src.go:4: inlined call (first try) 2 | gave up after 0 final tries 3 | -------------------------------------------------------------------------------- /testdata/inline-call-anon/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/inline-call-anon/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-call-anon/src.go -------------------------------------------------------------------------------- /testdata/inline-call-anon/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-call-anon/src.go.min -------------------------------------------------------------------------------- /testdata/inline-call-var/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-call-var/log -------------------------------------------------------------------------------- /testdata/inline-call-var/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/inline-call-var/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-call-var/src.go -------------------------------------------------------------------------------- /testdata/inline-call-var/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-call-var/src.go.min -------------------------------------------------------------------------------- /testdata/inline-call/log: -------------------------------------------------------------------------------- 1 | src.go:4: inlined call (first try) 2 | gave up after 0 final tries 3 | -------------------------------------------------------------------------------- /testdata/inline-call/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/inline-call/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-call/src.go -------------------------------------------------------------------------------- /testdata/inline-call/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-call/src.go.min -------------------------------------------------------------------------------- /testdata/inline-case/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-case/log -------------------------------------------------------------------------------- /testdata/inline-case/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/inline-case/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-case/src.go -------------------------------------------------------------------------------- /testdata/inline-case/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-case/src.go.min -------------------------------------------------------------------------------- /testdata/inline-const/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-const/log -------------------------------------------------------------------------------- /testdata/inline-const/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/inline-const/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-const/src.go -------------------------------------------------------------------------------- /testdata/inline-const/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-const/src.go.min -------------------------------------------------------------------------------- /testdata/inline-defs/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-defs/log -------------------------------------------------------------------------------- /testdata/inline-defs/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/inline-defs/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-defs/src.go -------------------------------------------------------------------------------- /testdata/inline-defs/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-defs/src.go.min -------------------------------------------------------------------------------- /testdata/inline-var/log: -------------------------------------------------------------------------------- 1 | src.go:6: var inlined (first try) 2 | gave up after 0 final tries 3 | -------------------------------------------------------------------------------- /testdata/inline-var/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/inline-var/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-var/src.go -------------------------------------------------------------------------------- /testdata/inline-var/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/inline-var/src.go.min -------------------------------------------------------------------------------- /testdata/reduce-slice/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/reduce-slice/log -------------------------------------------------------------------------------- /testdata/reduce-slice/match: -------------------------------------------------------------------------------- 1 | slice bounds out of range 2 | -------------------------------------------------------------------------------- /testdata/reduce-slice/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/reduce-slice/src.go -------------------------------------------------------------------------------- /testdata/reduce-slice/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/reduce-slice/src.go.min -------------------------------------------------------------------------------- /testdata/remove-import/log: -------------------------------------------------------------------------------- 1 | src.go:9: AssignStmt removed (first try) 2 | gave up after 0 final tries 3 | -------------------------------------------------------------------------------- /testdata/remove-import/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/remove-import/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-import/src.go -------------------------------------------------------------------------------- /testdata/remove-import/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-import/src.go.min -------------------------------------------------------------------------------- /testdata/remove-index/log: -------------------------------------------------------------------------------- 1 | src.go:4: a[b] -> a (first try) 2 | gave up after 1 final tries 3 | -------------------------------------------------------------------------------- /testdata/remove-index/match: -------------------------------------------------------------------------------- 1 | index out of range 2 | -------------------------------------------------------------------------------- /testdata/remove-index/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-index/src.go -------------------------------------------------------------------------------- /testdata/remove-index/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-index/src.go.min -------------------------------------------------------------------------------- /testdata/remove-paren/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-paren/log -------------------------------------------------------------------------------- /testdata/remove-paren/match: -------------------------------------------------------------------------------- 1 | panic: 3 2 | -------------------------------------------------------------------------------- /testdata/remove-paren/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-paren/src.go -------------------------------------------------------------------------------- /testdata/remove-paren/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-paren/src.go.min -------------------------------------------------------------------------------- /testdata/remove-recv/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-recv/log -------------------------------------------------------------------------------- /testdata/remove-recv/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/remove-recv/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-recv/src.go -------------------------------------------------------------------------------- /testdata/remove-recv/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-recv/src.go.min -------------------------------------------------------------------------------- /testdata/remove-slice/log: -------------------------------------------------------------------------------- 1 | src.go:4: a[b:] -> a (first try) 2 | gave up after 1 final tries 3 | -------------------------------------------------------------------------------- /testdata/remove-slice/match: -------------------------------------------------------------------------------- 1 | index out of range 2 | -------------------------------------------------------------------------------- /testdata/remove-slice/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-slice/src.go -------------------------------------------------------------------------------- /testdata/remove-slice/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-slice/src.go.min -------------------------------------------------------------------------------- /testdata/remove-star/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-star/log -------------------------------------------------------------------------------- /testdata/remove-star/match: -------------------------------------------------------------------------------- 1 | index out of range 2 | -------------------------------------------------------------------------------- /testdata/remove-star/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-star/src.go -------------------------------------------------------------------------------- /testdata/remove-star/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-star/src.go.min -------------------------------------------------------------------------------- /testdata/remove-stmt/log: -------------------------------------------------------------------------------- 1 | src.go:5: removed var decl (first try) 2 | gave up after 0 final tries 3 | -------------------------------------------------------------------------------- /testdata/remove-stmt/match: -------------------------------------------------------------------------------- 1 | panic: 0 2 | -------------------------------------------------------------------------------- /testdata/remove-stmt/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-stmt/src.go -------------------------------------------------------------------------------- /testdata/remove-stmt/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/remove-stmt/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-append-elems/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-append-elems/log -------------------------------------------------------------------------------- /testdata/resolve-append-elems/match: -------------------------------------------------------------------------------- 1 | panic: 4 2 | -------------------------------------------------------------------------------- /testdata/resolve-append-elems/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-append-elems/src.go -------------------------------------------------------------------------------- /testdata/resolve-append-elems/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-append-elems/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-binary-ints/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-binary-ints/log -------------------------------------------------------------------------------- /testdata/resolve-binary-ints/match: -------------------------------------------------------------------------------- 1 | panic: 6 2 | -------------------------------------------------------------------------------- /testdata/resolve-binary-ints/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-binary-ints/src.go -------------------------------------------------------------------------------- /testdata/resolve-binary-ints/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-binary-ints/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-binary-strs/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-binary-strs/log -------------------------------------------------------------------------------- /testdata/resolve-binary-strs/match: -------------------------------------------------------------------------------- 1 | panic: foobar 2 | -------------------------------------------------------------------------------- /testdata/resolve-binary-strs/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-binary-strs/src.go -------------------------------------------------------------------------------- /testdata/resolve-binary-strs/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-binary-strs/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-index-complit/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-index-complit/log -------------------------------------------------------------------------------- /testdata/resolve-index-complit/match: -------------------------------------------------------------------------------- 1 | panic: 3 2 | -------------------------------------------------------------------------------- /testdata/resolve-index-complit/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-index-complit/src.go -------------------------------------------------------------------------------- /testdata/resolve-index-complit/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-index-complit/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-index-strs/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-index-strs/log -------------------------------------------------------------------------------- /testdata/resolve-index-strs/match: -------------------------------------------------------------------------------- 1 | panic: (\(uint8|\(int32|102) 2 | -------------------------------------------------------------------------------- /testdata/resolve-index-strs/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-index-strs/src.go -------------------------------------------------------------------------------- /testdata/resolve-index-strs/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-index-strs/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-len-strs/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-len-strs/log -------------------------------------------------------------------------------- /testdata/resolve-len-strs/match: -------------------------------------------------------------------------------- 1 | panic: 3 2 | -------------------------------------------------------------------------------- /testdata/resolve-len-strs/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-len-strs/src.go -------------------------------------------------------------------------------- /testdata/resolve-len-strs/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-len-strs/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-slice-complit/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-slice-complit/log -------------------------------------------------------------------------------- /testdata/resolve-slice-complit/match: -------------------------------------------------------------------------------- 1 | panic: 3 2 | -------------------------------------------------------------------------------- /testdata/resolve-slice-complit/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-slice-complit/src.go -------------------------------------------------------------------------------- /testdata/resolve-slice-complit/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-slice-complit/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-slice-strs/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-slice-strs/log -------------------------------------------------------------------------------- /testdata/resolve-slice-strs/match: -------------------------------------------------------------------------------- 1 | panic: oob 2 | -------------------------------------------------------------------------------- /testdata/resolve-slice-strs/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-slice-strs/src.go -------------------------------------------------------------------------------- /testdata/resolve-slice-strs/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-slice-strs/src.go.min -------------------------------------------------------------------------------- /testdata/resolve-unary-ints/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-unary-ints/log -------------------------------------------------------------------------------- /testdata/resolve-unary-ints/match: -------------------------------------------------------------------------------- 1 | panic: 2 2 | -------------------------------------------------------------------------------- /testdata/resolve-unary-ints/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-unary-ints/src.go -------------------------------------------------------------------------------- /testdata/resolve-unary-ints/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/resolve-unary-ints/src.go.min -------------------------------------------------------------------------------- /testdata/zero-complit/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/zero-complit/log -------------------------------------------------------------------------------- /testdata/zero-complit/match: -------------------------------------------------------------------------------- 1 | panic: \(\[\]int\) 2 | -------------------------------------------------------------------------------- /testdata/zero-complit/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/zero-complit/src.go -------------------------------------------------------------------------------- /testdata/zero-complit/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/zero-complit/src.go.min -------------------------------------------------------------------------------- /testdata/zero-lit/log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/zero-lit/log -------------------------------------------------------------------------------- /testdata/zero-lit/match: -------------------------------------------------------------------------------- 1 | index out of range 2 | -------------------------------------------------------------------------------- /testdata/zero-lit/src.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/zero-lit/src.go -------------------------------------------------------------------------------- /testdata/zero-lit/src.go.min: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/testdata/zero-lit/src.go.min -------------------------------------------------------------------------------- /walk.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvdan/goreduce/HEAD/walk.go --------------------------------------------------------------------------------