gitlab.com/Raven-IO/raven-delve@v1.22.4/_fixtures/issue2896.go (about) 1 package main 2 3 // Vehicle defines the vehicle behavior 4 type Vehicle interface { 5 // Run vehicle can run in a speed 6 Run() 7 } 8 9 // BMWS1000RR defines the motocycle bmw s1000rr 10 type BMWS1000RR struct { 11 } 12 13 // Run bwm s1000rr run 14 func (a *BMWS1000RR) Run() { 15 println("I can run at 300km/h") 16 } 17 18 func main() { 19 var vehicle Vehicle = &BMWS1000RR{} 20 vehicle.Run() 21 }