Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/camilaleniss/design-patterns-go
/ functions
Functions
358 in github.com/camilaleniss/design-patterns-go
⨍
Functions
358
◇
Types & classes
174
↓ 8 callers
Method
Join
(p *Person)
4-behavioural/mediator/main.go:46
↓ 6 callers
Method
Fire
(q *Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:35
↓ 5 callers
Method
Print
(d Document)
1-solid-principles/interface-segregation/main.go:8
↓ 5 callers
Method
Value
()
4-behavioural/interpreter/main.go:17
↓ 4 callers
Function
Connect
now this method let us to sum up all types of neurons
3-structural/composite/neural-network-example/main.go:43
↓ 4 callers
Function
NewBankAccountCommand
(account *BankAccount, action Action, amount int)
4-behavioural/command/composite-command/main.go:113
↓ 4 callers
Method
String
()
2-creational/builder/basic/main.go:22
↓ 4 callers
Method
Subscribe
(o Observer)
4-behavioural/chain-of-responsibility/broker-chain/main.go:33
↓ 4 callers
Function
minmax
just a helper func
3-structural/adapter/main.go:14
↓ 3 callers
Method
Add
recursive func to add a modifier to the end
4-behavioural/chain-of-responsibility/method-chain/main.go:32
↓ 3 callers
Method
CanVote
the fact that a person can vote depends on the age
4-behavioural/observer/property-dependencies/main.go:49
↓ 3 callers
Method
FullName
()
3-structural/flyweight/usernames-example/main.go:44
↓ 3 callers
Method
GetPopulation
(name string)
2-creational/singleton/main.go:16
↓ 3 callers
Function
GetSingletonDatabase
()
2-creational/singleton/main.go:72
↓ 3 callers
Method
Handle
()
4-behavioural/chain-of-responsibility/method-chain/main.go:22
↓ 3 callers
Method
IsSatisfied
(p *Product)
1-solid-principles/open-closed/main.go:78
↓ 3 callers
Function
NewPerson
(name string)
4-behavioural/mediator/main.go:14
↓ 3 callers
Function
NewUser
(fullName string)
3-structural/flyweight/usernames-example/main.go:13
↓ 3 callers
Function
NewUser2
uploading to the slice
3-structural/flyweight/usernames-example/main.go:25
↓ 3 callers
Method
Notify
(data interface{})
4-behavioural/observer/property-changes/main.go:31
↓ 3 callers
Method
Print
(sb *strings.Builder)
4-behavioural/visitor/intrusive/main.go:9
↓ 3 callers
Method
Reset
allows us to reuse the text processor with another strategy
4-behavioural/strategy/main.go:93
↓ 3 callers
Method
Say
(message string)
4-behavioural/mediator/main.go:24
↓ 3 callers
Method
String
()
4-behavioural/chain-of-responsibility/broker-chain/main.go:87
↓ 3 callers
Method
String
()
4-behavioural/visitor/classic/main.go:57
↓ 2 callers
Method
Accept
(ev ExpressionVisitor)
4-behavioural/visitor/classic/main.go:15
↓ 2 callers
Method
AddChildFluent
returning the pointer allows us to continue adding childs
2-creational/builder/basic/main.go:70
↓ 2 callers
Method
AddEntry
(text string)
1-solid-principles/single-responsibility/main.go:21
↓ 2 callers
Method
AddParentAndChild
(parent, child *Person)
1-solid-principles/dependency-inversion/main.go:49
↓ 2 callers
Method
AppendList
(items []string)
4-behavioural/strategy/main.go:84
↓ 2 callers
Method
At
methods to set up the job
2-creational/builder/advanced/main.go:36
↓ 2 callers
Method
Broadcast
makes everyone receives the message
4-behavioural/mediator/main.go:38
↓ 2 callers
Method
Call
()
4-behavioural/command/main.go:55
↓ 2 callers
Method
Call
()
4-behavioural/command/composite-command/main.go:28
↓ 2 callers
Method
Call
()
4-behavioural/command/composite-command/main.go:58
↓ 2 callers
Method
Close
()
4-behavioural/chain-of-responsibility/broker-chain/main.go:120
↓ 2 callers
Method
Deposit
notice that the point can be nil
4-behavioural/memento/main.go:25
↓ 2 callers
Method
Deposit
(amount int)
4-behavioural/memento/undo-redo/main.go:29
↓ 2 callers
Method
Deposit
(amount int)
4-behavioural/command/main.go:18
↓ 2 callers
Method
Deposit
(amount int)
4-behavioural/command/composite-command/main.go:11
↓ 2 callers
Method
Draw
use the abstraction
3-structural/bridge/main.go:42
↓ 2 callers
Method
Draw
()
3-structural/proxy/virtual-proxy/main.go:7
↓ 2 callers
Method
Filter
and a better filter that just need to receive the specification which implements the IsSatisfied method
1-solid-principles/open-closed/main.go:110
↓ 2 callers
Function
GetTotalPopulationEx
(db Database, cities []string)
2-creational/singleton/main.go:97
↓ 2 callers
Method
GetWidth
()
1-solid-principles/liscov-substitution/main.go:6
↓ 2 callers
Method
Iter
()
3-structural/composite/neural-network-example/main.go:5
↓ 2 callers
Method
MoveNext
to continue iterating
4-behavioural/iterator/tree-transversal/main.go:47
↓ 2 callers
Function
NewBankAccountCommand
(account *BankAccount, action Action, amount int)
4-behavioural/command/main.go:79
↓ 2 callers
Function
NewCircle
receive the renderer
3-structural/bridge/main.go:47
↓ 2 callers
Function
NewCircle
(color string)
3-structural/composite/drawing-example/main.go:35
↓ 2 callers
Function
NewDoubleAttackModifier
( c *Creature)
4-behavioural/chain-of-responsibility/method-chain/main.go:57
↓ 2 callers
Function
NewEmployeeFactory
what if we want factories for specific roles? functional approach
2-creational/factories/generator/main.go:13
↓ 2 callers
Function
NewInOrderIterator
(root *Node)
4-behavioural/iterator/tree-transversal/main.go:28
↓ 2 callers
Function
NewNeuronLayer
(count int)
3-structural/composite/neural-network-example/main.go:38
↓ 2 callers
Function
NewOffState
()
4-behavioural/state/main.go:64
↓ 2 callers
Function
NewSquare
(color string)
3-structural/composite/drawing-example/main.go:39
↓ 2 callers
Function
NewTerminalNode
node without children
4-behavioural/iterator/tree-transversal/main.go:18
↓ 2 callers
Method
Off
()
4-behavioural/state/main.go:23
↓ 2 callers
Method
Range
(start, end int)
3-structural/flyweight/text-formatting-example/main.go:79
↓ 2 callers
Method
Receive
(sender, message string)
4-behavioural/mediator/main.go:18
↓ 2 callers
Method
Render
()
3-structural/decorator/main.go:13
↓ 2 callers
Method
Restore
(m *Memento)
4-behavioural/memento/main.go:30
↓ 2 callers
Method
Scan
(d Document)
1-solid-principles/interface-segregation/main.go:53
↓ 2 callers
Method
SetSucceeded
(value bool)
4-behavioural/command/composite-command/main.go:32
↓ 2 callers
Method
String
()
4-behavioural/chain-of-responsibility/method-chain/main.go:10
↓ 2 callers
Method
String
string method to be able to print this
4-behavioural/state/handmade-state-machine/main.go:22
↓ 2 callers
Method
String
()
3-structural/composite/drawing-example/main.go:15
↓ 2 callers
Method
String
()
3-structural/flyweight/text-formatting-example/main.go:18
↓ 2 callers
Method
Succeeded
saving the status
4-behavioural/command/composite-command/main.go:31
↓ 2 callers
Method
Undo
()
4-behavioural/memento/undo-redo/main.go:53
↓ 2 callers
Method
Undo
()
4-behavioural/command/composite-command/main.go:29
↓ 2 callers
Method
Undo
()
4-behavioural/command/composite-command/main.go:68
↓ 2 callers
Method
Unsubscribe
(o Observer)
4-behavioural/chain-of-responsibility/broker-chain/main.go:34
↓ 2 callers
Function
UseIt
(sized Sized)
1-solid-principles/liscov-substitution/main.go:69
↓ 2 callers
Function
VectorToRaster
(vi *VectorImage)
3-structural/adapter/main.go:151
↓ 2 callers
Method
Withdraw
(amount int)
4-behavioural/command/main.go:24
↓ 2 callers
Method
Withdraw
(amount int)
4-behavioural/command/composite-command/main.go:17
↓ 2 callers
Function
newEmployee
utility method for configuring emp ↓ lowercase
2-creational/prototype/factory/main.go:43
↓ 1 callers
Method
Add
(m Modifier)
4-behavioural/chain-of-responsibility/method-chain/main.go:21
↓ 1 callers
Method
AddListItem
(builder *strings.Builder, item string)
4-behavioural/strategy/main.go:30
↓ 1 callers
Method
AsA
( position string)
2-creational/builder/advanced/main.go:42
↓ 1 callers
Method
At
(index int)
3-structural/facade/main.go:19
↓ 1 callers
Method
Attack
()
4-behavioural/chain-of-responsibility/broker-chain/main.go:72
↓ 1 callers
Method
Body
(body string)
2-creational/builder/parameter/main.go:34
↓ 1 callers
Method
Build
for building the entire person
2-creational/builder/advanced/main.go:20
↓ 1 callers
Method
Build
()
2-creational/builder/functional/main.go:21
↓ 1 callers
Method
Call
()
4-behavioural/command/composite-command/main.go:132
↓ 1 callers
Method
Called
(name string)
2-creational/builder/functional/main.go:14
↓ 1 callers
Method
Capitalize
(start, end int)
3-structural/flyweight/text-formatting-example/main.go:36
↓ 1 callers
Method
CatchACold
()
4-behavioural/observer/main.go:59
↓ 1 callers
Method
ConnectTo
(other *Neuron)
3-structural/composite/neural-network-example/main.go:18
↓ 1 callers
Method
Covers
helper func
3-structural/flyweight/text-formatting-example/main.go:49
↓ 1 callers
Method
Create
(name string)
2-creational/factories/generator/main.go:31
↓ 1 callers
Method
DeepCopy
()
2-creational/prototype/serialization/main.go:19
↓ 1 callers
Method
DeepCopy
()
2-creational/prototype/factory/main.go:19
↓ 1 callers
Method
DeepCopy
()
2-creational/prototype/copy-method/main.go:24
↓ 1 callers
Method
Defense
()
4-behavioural/chain-of-responsibility/broker-chain/main.go:80
↓ 1 callers
Function
Deposit
(ba *BankAccount, amount int)
4-behavioural/command/functional/main.go:9
↓ 1 callers
Function
DrawImage
(image Image)
3-structural/proxy/virtual-proxy/main.go:24
↓ 1 callers
Function
DrawPoints
helper func to draw
3-structural/adapter/main.go:51
next →
1–100 of 358, ranked by callers