| 1 |
|
| 2 |
-- go.mod -- |
| 3 |
module example.com |
| 4 |
go 1.18 |
| 5 |
|
| 6 |
-- template/template.go -- |
| 7 |
package template |
| 8 |
|
| 9 |
import () |
| 10 |
|
| 11 |
func before(x int) int { return x + x + x } |
| 12 |
func after(x int) int { |
| 13 |
temp := x + x |
| 14 |
return temp + x |
| 15 |
} |
| 16 |
|
| 17 |
-- in/j1/j1.go -- |
| 18 |
package j1 |
| 19 |
|
| 20 |
import "fmt" |
| 21 |
|
| 22 |
func example() { |
| 23 |
temp := 5 |
| 24 |
fmt.Print(temp + temp + temp) |
| 25 |
} |
| 26 |
|
| 27 |
-- out/j1/j1.go -- |
| 28 |
package j1 |
| 29 |
|
| 30 |
import "fmt" |
| 31 |
|
| 32 |
func example() { |
| 33 |
temp := 5 |
| 34 |
temp := temp + temp |
| 35 |
fmt.Print(temp + temp) |
| 36 |
} |