From b3eb3225a68d76c74d04ccaab599f630ada7b42f Mon Sep 17 00:00:00 2001 From: Vladislav Klimenko Date: Wed, 16 Oct 2024 21:05:29 +0300 Subject: [PATCH] creational/builder: change wheels to more appropriate Sports car is expected to have sports wheels, while family car may have steel wheels --- creational/builder.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/creational/builder.md b/creational/builder.md index e19179e..9ba2641 100644 --- a/creational/builder.md +++ b/creational/builder.md @@ -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() ```