You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
golang-tutorial/demo/method01.go

20 lines
205 B

package main
import (
"fmt"
)
type Person struct {
name string
age int
schoole string
}
// mechtod
func (p Person) ShowName() {
fmt.Printf("name is %s, age is %s", p.name,p.age);
}
func main(){
}