using method with a struct
package main
import (
"fmt"
"runtime"
)
type apple struct {
count int
}
func (fruit apple) addtocount(amount int) {
fruit.count += 1
}
func main() {
tom := apple{count:3}
tom.addtocount(3)
fmt.Println(tom)
runtime.GC()
}