1
0
Fork 0
mirror of https://github.com/tmrts/go-patterns.git synced 2025-04-04 13:43:37 +03:00
This commit is contained in:
Vladislav Klimenko 2024-10-16 21:06:18 +03:00 committed by GitHub
commit 7d8ed66fec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
```