mirror of
https://github.com/tmrts/go-patterns.git
synced 2025-04-02 20:56:12 +03:00
creational/builder: fix typo, use correct interface method
Use the correct interface method in Builder pattern example
This commit is contained in:
parent
f978e42036
commit
d3288c71aa
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ type Interface interface {
|
|||
## Usage
|
||||
|
||||
```go
|
||||
assembly := car.NewBuilder().Paint(car.RedColor)
|
||||
assembly := car.NewBuilder().Color(car.RedColor)
|
||||
|
||||
familyCar := assembly.Wheels(car.SportsWheels).TopSpeed(50 * car.MPH).Build()
|
||||
familyCar.Drive()
|
||||
|
|
Loading…
Add table
Reference in a new issue