From 4d2d068702effd0c453b79ebac1ded9d58dc37a3 Mon Sep 17 00:00:00 2001 From: Oleg Butuzov Date: Sun, 18 Feb 2018 15:43:42 +0200 Subject: [PATCH] Builder pattern `Usage` Example changed to reflect consistency --- creational/builder.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/creational/builder.md b/creational/builder.md index e19179e..d7ebb16 100644 --- a/creational/builder.md +++ b/creational/builder.md @@ -51,11 +51,11 @@ 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 := 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() ```