Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/Go-Design-Patterns
/ functions
Functions
336 in github.com/PacktPublishing/Go-Design-Patterns
⨍
Functions
336
◇
Types & classes
169
↓ 9 callers
Method
Add
(m memento)
Chapter06/memento/memento.go:33
↓ 8 callers
Method
Read
()
Chapter06/interpreter/oo_interpreter/interpreter.go:14
↓ 6 callers
Method
GetVehicle
(v int)
Chapter02/abstract_factory/vehicle_factory.go:9
↓ 5 callers
Method
AddCommand
(c Command)
Chapter05/command/example1/command.go:32
↓ 5 callers
Function
CreateCommand
(s string)
Chapter05/command/example1/command.go:20
↓ 5 callers
Method
Fail
(f FailFunc)
Chapter09/09_06.go:17
↓ 5 callers
Method
FindUser
FindUser will search for the specified name in the parameter in the cache list. If it finds it, it will return it. If not, it will search in the heavy
Chapter04/proxy/proxy.go:57
↓ 4 callers
Method
AddOne
()
Chapter02/main.go:17
↓ 4 callers
Function
GetInstance
()
Chapter02/main.go:9
↓ 4 callers
Method
GetNumberOfObjects
()
Chapter04/flyweight/flyweight.go:76
↓ 4 callers
Method
GetTeam
(teamName int)
Chapter04/flyweight/flyweight.go:65
↓ 4 callers
Method
GetWheels
()
Chapter02/abstract_factory/vehicle.go:4
↓ 4 callers
Method
Next
(Command)
Chapter05/command/example3/chain_command.go:13
↓ 4 callers
Method
Write
(p []byte)
Chapter05/chain-of-responsability/chain_test.go:13
↓ 3 callers
Method
AddIngredient
()
Chapter04/decorator/pizza_decorator.go:39
↓ 3 callers
Method
AddObserver
(o Observer)
Chapter07/observer/observer.go:13
↓ 3 callers
Method
Construct
()
Chapter02/builder.go:15
↓ 3 callers
Method
Count
(n uint64)
Chapter04/test.go:124
↓ 3 callers
Method
Draw
()
Chapter05/strategy/example2/output_strategy.go:6
↓ 3 callers
Method
Draw
()
Chapter05/strategy/example1/main.go:15
↓ 3 callers
Function
GetPaymentMethod
CreatePaymentMethod returns a pointer to a PaymentMethod object or an error if the method is not registered. We used "new" operator to return the poin
Chapter02/factory.go:24
↓ 3 callers
Function
GetVehicleFactory
(f int)
Chapter02/abstract_factory/vehicle_factory.go:17
↓ 3 callers
Method
Info
()
Chapter05/command/example2/command.go:9
↓ 3 callers
Method
NewMemento
()
Chapter06/memento/memento.go:19
↓ 3 callers
Method
Next
(s string)
Chapter05/chain-of-responsability/chain.go:17
↓ 3 callers
Method
Pop
()
Chapter06/interpreter/interpreter.go:52
↓ 3 callers
Method
Pop
()
Chapter06/interpreter/oo_interpreter/interpreter.go:65
↓ 3 callers
Method
SetBuilder
(b BuildProcess)
Chapter02/builder.go:19
↓ 3 callers
Method
Write
(p []byte)
Chapter03/bridge/bridge_test.go:22
↓ 3 callers
Function
expectedOrError
(res string, expected string, t *testing.T)
Chapter06/template/template_test.go:49
↓ 2 callers
Method
Accept
(v Visitor)
Chapter07/visitor/visitor.go:42
↓ 2 callers
Method
Accept
(Visitor)
Chapter07/visitor/visitor2/visitor.go:17
↓ 2 callers
Method
AddIngredient
()
Chapter04/decorator/pizza_decorator.go:9
↓ 2 callers
Method
AddIngredient
()
Chapter04/decorator/pizza_decorator.go:24
↓ 2 callers
Function
Calculate
(o string)
Chapter06/interpreter/interpreter.go:64
↓ 2 callers
Function
Divide
Divide will take two arguments and return its division as far as the second argument isn't zero that will return an error
Chapter01/libraries/arithmetic/arithmetic.go:47
↓ 2 callers
Method
ExecuteAlgorithm
(MessageRetriever)
Chapter06/template/simple_template.go:12
↓ 2 callers
Method
FindUser
(id string)
Chapter04/proxy/proxy.go:10
↓ 2 callers
Method
GetClone
(m int)
Chapter02/prototype.go:9
↓ 2 callers
Method
GetCount
()
Chapter02/main.go:22
↓ 2 callers
Method
GetDoors
()
Chapter02/abstract_factory/car.go:4
↓ 2 callers
Method
GetDrivingSideInCountry
()
Chapter01/interfaces/main.go:6
↓ 2 callers
Method
GetInfo
()
Chapter02/prototype.go:41
↓ 2 callers
Method
GetSeats
()
Chapter02/abstract_factory/vehicle.go:5
↓ 2 callers
Method
GetSideToDrive
(country SideInCountry)
Chapter01/interfaces/main.go:23
↓ 2 callers
Method
GetType
()
Chapter02/abstract_factory/motorbike.go:4
↓ 2 callers
Method
Memento
(i int)
Chapter06/memento/memento.go:37
↓ 2 callers
Function
Multiply
Multiply will take as many arguments as you want and will return the multiplication of them
Chapter01/libraries/arithmetic/arithmetic.go:32
↓ 2 callers
Function
NewTeamFactory
()
Chapter04/flyweight/flyweight.go:55
↓ 2 callers
Method
Pay
(amount float32)
Chapter02/factory.go:11
↓ 2 callers
Method
Print
()
Chapter07/visitor/visitor.go:33
↓ 2 callers
Method
Print
()
Chapter03/bridge/bridge.go:50
↓ 2 callers
Method
Print
()
Chapter03/bridge/bridge.go:62
↓ 2 callers
Method
PrintMessage
(string)
Chapter03/bridge/bridge.go:12
↓ 2 callers
Method
PrintMessage
(msg string)
Chapter03/bridge/bridge.go:28
↓ 2 callers
Method
PrintStored
()
Chapter03/adapter/adapter.go:32
↓ 2 callers
Method
Push
(s int)
Chapter06/interpreter/interpreter.go:48
↓ 2 callers
Method
Push
(s Interpreter)
Chapter06/interpreter/oo_interpreter/interpreter.go:61
↓ 2 callers
Method
RestoreSettings
()
Chapter06/memento/memento_command/memento_command.go:75
↓ 2 callers
Method
SaveSettings
(s Command)
Chapter06/memento/memento_command/memento_command.go:70
↓ 2 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
Chapter04/decorator/server/server_decorator.go:13
↓ 2 callers
Method
SetWriter
(io.Writer)
Chapter05/strategy/example2/output_strategy.go:8
↓ 2 callers
Function
Subtract
Subtract will take as many arguments as you pass to it and return the subtraction of them
Chapter01/libraries/arithmetic/arithmetic.go:17
↓ 2 callers
Function
Sum
Sum will take as many arguments as you pass to it and return the sum of all of them
Chapter01/libraries/arithmetic/arithmetic.go:7
↓ 2 callers
Method
Swim
()
Chapter03/composite/composite.go:24
↓ 2 callers
Method
Train
()
Chapter03/composite/composite.go:21
↓ 2 callers
Method
Visit
(ProductInfoRetriever)
Chapter07/visitor/visitor2/visitor.go:13
↓ 2 callers
Function
assertAndPrint
(c Command)
Chapter06/memento/memento_command/memento_command.go:92
↓ 2 callers
Method
doRequest
(uri string)
Chapter04/facade/facade.go:96
↓ 2 callers
Method
executeState
(*GameContext)
Chapter07/state/state_refactored/state.go:11
↓ 2 callers
Method
responseParser
(body io.Reader)
Chapter04/facade/facade.go:86
↓ 2 callers
Function
sum
(a, b int)
Chapter01/testing/main.go:18
↓ 2 callers
Function
toUpperAsync
(word string, f func(string))
Chapter08/08_09.go:24
↓ 1 callers
Method
AddIngredient
()
Chapter04/decorator/pizza_decorator.go:16
↓ 1 callers
Method
DoSomething
()
Chapter04/test.go:12
↓ 1 callers
Method
Eat
()
Chapter03/composite/composite.go:42
↓ 1 callers
Method
Execute
()
Chapter05/command/example1/command.go:9
↓ 1 callers
Method
ExecuteAlgorithm
(m MessageRetriever)
Chapter06/template/simple_template.go:27
↓ 1 callers
Method
ExtractAndStoreCommand
(m Memento)
Chapter06/memento/memento_command/memento_command.go:39
↓ 1 callers
Method
ExtractAndStoreState
(m memento)
Chapter06/memento/memento.go:23
↓ 1 callers
Method
GetByCityAndCountryCode
GetByCityAndCountryCode returns the current weather data by passing a city name and an ISO country code. It returns weather information or a detailed
Chapter04/facade/facade.go:82
↓ 1 callers
Method
GetByGeoCoordinates
GetByGeoCoordinates returns the current weather data by passing a geographical coordinates (latitude and longitude) in decimal notation. It returns we
Chapter04/facade/facade.go:74
↓ 1 callers
Method
GetFullName
()
Chapter01/structs/main.go:12
↓ 1 callers
Method
GetName
()
Chapter07/visitor/visitor2/visitor.go:9
↓ 1 callers
Function
GetParentField
(p Parent)
Chapter03/composite/composite.go:69
↓ 1 callers
Method
GetPrice
()
Chapter07/visitor/visitor2/visitor.go:8
↓ 1 callers
Function
GetShirtsCloner
()
Chapter02/prototype.go:18
↓ 1 callers
Method
GetSideToRide
(country SideInCountry)
Chapter01/interfaces/main.go:29
↓ 1 callers
Method
GetVehicle
()
Chapter02/builder.go:50
↓ 1 callers
Method
GetVehicle
()
Chapter02/builder.go:74
↓ 1 callers
Method
GetVehicle
()
Chapter02/builder.go:98
↓ 1 callers
Method
Message
()
Chapter06/template/simple_template.go:6
↓ 1 callers
Function
MessageRetrieverAdapter
(f func() string)
Chapter06/template/simple_template.go:61
↓ 1 callers
Function
Multiply
(a, b int)
Chapter01/testing/multiply/main.go:7
↓ 1 callers
Method
NewMemento
()
Chapter06/memento/memento_command/memento_command.go:35
↓ 1 callers
Method
Next
(c Command)
Chapter05/command/example3/chain_command.go:28
↓ 1 callers
Method
Notify
(string)
Chapter07/observer/observer.go:6
↓ 1 callers
Method
NotifyObservers
(m string)
Chapter07/observer/observer.go:30
↓ 1 callers
Method
Pop
()
Chapter06/memento/memento_command/memento_command.go:53
↓ 1 callers
Method
Print
(s string)
Chapter03/adapter/adapter.go:8
next →
1–100 of 336, ranked by callers