2019-06-18 08:23:37 -06:00
|
|
|
package a
|
|
|
|
|
2019-06-27 12:01:56 -06:00
|
|
|
import (
|
|
|
|
lg "log"
|
|
|
|
"fmt"
|
|
|
|
f2 "fmt"
|
|
|
|
)
|
2019-06-27 12:09:03 -06:00
|
|
|
|
2019-06-18 08:23:37 -06:00
|
|
|
func Random() int {
|
|
|
|
y := 6 + 7
|
|
|
|
return y
|
|
|
|
}
|
|
|
|
|
|
|
|
func Random2(y int) int { //@rename("y", "z")
|
|
|
|
return y
|
|
|
|
}
|
|
|
|
|
|
|
|
type Pos struct {
|
|
|
|
x, y int
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Pos) Sum() int {
|
|
|
|
return p.x + p.y //@rename("x", "myX")
|
|
|
|
}
|
|
|
|
|
|
|
|
func _() {
|
|
|
|
var p Pos //@rename("p", "pos")
|
|
|
|
_ = p.Sum() //@rename("Sum", "GetSum")
|
|
|
|
}
|
2019-06-27 12:09:03 -06:00
|
|
|
|
|
|
|
func sw() {
|
|
|
|
var x interface{}
|
|
|
|
|
|
|
|
switch y := x.(type) { //@rename("y", "y0")
|
|
|
|
case int:
|
2019-06-27 12:01:56 -06:00
|
|
|
fmt.Printf("%d", y) //@rename("y", "y1"),rename("fmt", "format")
|
2019-06-27 12:09:03 -06:00
|
|
|
case string:
|
2019-06-27 12:01:56 -06:00
|
|
|
lg.Printf("%s", y) //@rename("y", "y2"),rename("lg","log")
|
2019-06-27 12:09:03 -06:00
|
|
|
default:
|
2019-06-27 12:01:56 -06:00
|
|
|
f2.Printf("%v", y) //@rename("y", "y3"),rename("f2","fmt2")
|
2019-06-27 12:09:03 -06:00
|
|
|
}
|
|
|
|
}
|