github.com/l3x/learn-fp-go@v0.0.0-20171228022418-7639825d0b71/2-design-patterns/ch04-solid/03_car/main.go (about)

     1  package main
     2  
     3  import (
     4  	. "car"
     5  	"fmt"
     6  )
     7  
     8  func main() {
     9  	accord := Car{"Honda", "Accord"}
    10  	accord.PrintInfo()
    11  	highlander := CarWithSpare{Car{"Toyota", "Highlander"}}
    12  	highlander.PrintInfo()
    13  	fmt.Printf("%v has %d tires\n", highlander.Car, highlander.Tires())
    14  	accord.PrintInfo()
    15  }