Newer
Older
01_hello / struct / struct3.go
yhornisse on 1 Oct 2021 212 bytes fix and add sample
package main

import "fmt"

type SampleStruct struct {
	Id int64
	Name string
}

func (p *SampleStruct) hoge() bool {
	fmt.Println(p.Name)
	return true
}


func main() {
	v := SampleStruct{1, "taro"}
	v.hoge()
}