Debian Codegraph @

refactor/eg/testdata/i.txtar

raw
1
2 -- go.mod --
3 module example.com
4 go 1.18
5
6 -- template/template.go --
7 package template
8
9 import (
10 "errors"
11 "fmt"
12 )
13
14 func before(s string) error { return fmt.Errorf("%s", s) }
15 func after(s string) error {
16 n := fmt.Sprintf("error - %s", s)
17 return errors.New(n)
18 }
19
20 -- in/i1/i1.go --
21 package i1
22
23 import "fmt"
24
25 func example() {
26 _ = fmt.Errorf("%s", "foo")
27 }
28
29 -- out/i1/i1.go --
30 package i1
31
32 import (
33 "errors"
34 "fmt"
35 )
36
37 func example() {
38
39 n := fmt.Sprintf("error - %s", "foo")
40 _ = errors.New(n)
41 }