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
add sample
master
1 parent
98d6f0b
commit
ee26abee3456905da4f6cae80a2c89d703fe1026
yhornisse
authored
on 1 Oct 2021
Patch
Showing
1 changed file
interface/interface2.go
Ignore Space
Show notes
View
interface/interface2.go
0 → 100644
package main import "fmt" type Hoge struct { Name string } type Parent interface { hoge(b bool) fuga() } func (p *Hoge) hoge(b bool) { fmt.Println(p.Name) } func fuga(v Parent) { v.hoge(true) } func main() { v := Hoge{"taro"} //fuga(&v) // build error fmt.Println(v) }
Show line notes below