GitBucket
4.23.0
Toggle navigation
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
sample-golang
/
01_hello
Browse code
fix sample
master
1 parent
2ab92b6
commit
d05275c869a05f164c1ebf0209b8d15e60e2b19e
yhornisse
authored
on 1 Oct 2021
Patch
Showing
1 changed file
struct/struct3.go
Ignore Space
Show notes
View
struct/struct3.go
package main import "fmt" type SampleStruct struct { Id int64 Name string } func (p *SampleStruct) hoge() bool { fmt.Println(p.Name) return true } func main() { v1 := SampleStruct{1, "taro"} v1.hoge() }
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() }
Show line notes below