package main
import (
"fmt"
)
type TZ int
func main() {
var t TZ
fmt.Println(t)
t.increase(100)
fmt.Println(t)
}
func (t *TZ) increase(add int) {
*t += TZ(add)
}
Reproduced in: https: //my.oschina.net/itfanr/blog/195615
package main
import (
"fmt"
)
type TZ int
func main() {
var t TZ
fmt.Println(t)
t.increase(100)
fmt.Println(t)
}
func (t *TZ) increase(add int) {
*t += TZ(add)
}
Reproduced in: https: //my.oschina.net/itfanr/blog/195615