mirror of
https://github.com/tmrts/go-patterns.git
synced 2025-04-04 13:43:37 +03:00
Merge b3eb3225a6
into f978e42036
This commit is contained in:
commit
7d8ed66fec
1 changed files with 2 additions and 2 deletions
|
@ -53,9 +53,9 @@ type Interface interface {
|
|||
```go
|
||||
assembly := car.NewBuilder().Paint(car.RedColor)
|
||||
|
||||
familyCar := assembly.Wheels(car.SportsWheels).TopSpeed(50 * car.MPH).Build()
|
||||
familyCar := assembly.Wheels(car.SteelWheels).TopSpeed(50 * car.MPH).Build()
|
||||
familyCar.Drive()
|
||||
|
||||
sportsCar := assembly.Wheels(car.SteelWheels).TopSpeed(150 * car.MPH).Build()
|
||||
sportsCar := assembly.Wheels(car.SportsWheels).TopSpeed(150 * car.MPH).Build()
|
||||
sportsCar.Drive()
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue