diff --git a/struct/struct3.go b/struct/struct3.go new file mode 100644 index 0000000..b0054ec --- /dev/null +++ b/struct/struct3.go @@ -0,0 +1,19 @@ +package main + +import "fmt" + +type SampleStruct struct { + Id int64 + Name string +} + +func (*SampleStruct) hoge() bool { + fmt.Println("hoge") + return true +} + + +func main() { + v1 := SampleStruct{1, "taro"} + v1.hoge() +}