MCPcopy Create free account

hub / github.com/camilaleniss/design-patterns-go / functions

Functions358 in github.com/camilaleniss/design-patterns-go

↓ 8 callersMethodJoin
(p *Person)
4-behavioural/mediator/main.go:46
↓ 6 callersMethodFire
(q *Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:35
↓ 5 callersMethodPrint
(d Document)
1-solid-principles/interface-segregation/main.go:8
↓ 5 callersMethodValue
()
4-behavioural/interpreter/main.go:17
↓ 4 callersFunctionConnect
now this method let us to sum up all types of neurons
3-structural/composite/neural-network-example/main.go:43
↓ 4 callersFunctionNewBankAccountCommand
(account *BankAccount, action Action, amount int)
4-behavioural/command/composite-command/main.go:113
↓ 4 callersMethodString
()
2-creational/builder/basic/main.go:22
↓ 4 callersMethodSubscribe
(o Observer)
4-behavioural/chain-of-responsibility/broker-chain/main.go:33
↓ 4 callersFunctionminmax
just a helper func
3-structural/adapter/main.go:14
↓ 3 callersMethodAdd
recursive func to add a modifier to the end
4-behavioural/chain-of-responsibility/method-chain/main.go:32
↓ 3 callersMethodCanVote
the fact that a person can vote depends on the age
4-behavioural/observer/property-dependencies/main.go:49
↓ 3 callersMethodFullName
()
3-structural/flyweight/usernames-example/main.go:44
↓ 3 callersMethodGetPopulation
(name string)
2-creational/singleton/main.go:16
↓ 3 callersFunctionGetSingletonDatabase
()
2-creational/singleton/main.go:72
↓ 3 callersMethodHandle
()
4-behavioural/chain-of-responsibility/method-chain/main.go:22
↓ 3 callersMethodIsSatisfied
(p *Product)
1-solid-principles/open-closed/main.go:78
↓ 3 callersFunctionNewPerson
(name string)
4-behavioural/mediator/main.go:14
↓ 3 callersFunctionNewUser
(fullName string)
3-structural/flyweight/usernames-example/main.go:13
↓ 3 callersFunctionNewUser2
uploading to the slice
3-structural/flyweight/usernames-example/main.go:25
↓ 3 callersMethodNotify
(data interface{})
4-behavioural/observer/property-changes/main.go:31
↓ 3 callersMethodPrint
(sb *strings.Builder)
4-behavioural/visitor/intrusive/main.go:9
↓ 3 callersMethodReset
allows us to reuse the text processor with another strategy
4-behavioural/strategy/main.go:93
↓ 3 callersMethodSay
(message string)
4-behavioural/mediator/main.go:24
↓ 3 callersMethodString
()
4-behavioural/chain-of-responsibility/broker-chain/main.go:87
↓ 3 callersMethodString
()
4-behavioural/visitor/classic/main.go:57
↓ 2 callersMethodAccept
(ev ExpressionVisitor)
4-behavioural/visitor/classic/main.go:15
↓ 2 callersMethodAddChildFluent
returning the pointer allows us to continue adding childs
2-creational/builder/basic/main.go:70
↓ 2 callersMethodAddEntry
(text string)
1-solid-principles/single-responsibility/main.go:21
↓ 2 callersMethodAddParentAndChild
(parent, child *Person)
1-solid-principles/dependency-inversion/main.go:49
↓ 2 callersMethodAppendList
(items []string)
4-behavioural/strategy/main.go:84
↓ 2 callersMethodAt
methods to set up the job
2-creational/builder/advanced/main.go:36
↓ 2 callersMethodBroadcast
makes everyone receives the message
4-behavioural/mediator/main.go:38
↓ 2 callersMethodCall
()
4-behavioural/command/main.go:55
↓ 2 callersMethodCall
()
4-behavioural/command/composite-command/main.go:28
↓ 2 callersMethodCall
()
4-behavioural/command/composite-command/main.go:58
↓ 2 callersMethodClose
()
4-behavioural/chain-of-responsibility/broker-chain/main.go:120
↓ 2 callersMethodDeposit
notice that the point can be nil
4-behavioural/memento/main.go:25
↓ 2 callersMethodDeposit
(amount int)
4-behavioural/memento/undo-redo/main.go:29
↓ 2 callersMethodDeposit
(amount int)
4-behavioural/command/main.go:18
↓ 2 callersMethodDeposit
(amount int)
4-behavioural/command/composite-command/main.go:11
↓ 2 callersMethodDraw
use the abstraction
3-structural/bridge/main.go:42
↓ 2 callersMethodDraw
()
3-structural/proxy/virtual-proxy/main.go:7
↓ 2 callersMethodFilter
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 callersFunctionGetTotalPopulationEx
(db Database, cities []string)
2-creational/singleton/main.go:97
↓ 2 callersMethodGetWidth
()
1-solid-principles/liscov-substitution/main.go:6
↓ 2 callersMethodIter
()
3-structural/composite/neural-network-example/main.go:5
↓ 2 callersMethodMoveNext
to continue iterating
4-behavioural/iterator/tree-transversal/main.go:47
↓ 2 callersFunctionNewBankAccountCommand
(account *BankAccount, action Action, amount int)
4-behavioural/command/main.go:79
↓ 2 callersFunctionNewCircle
receive the renderer
3-structural/bridge/main.go:47
↓ 2 callersFunctionNewCircle
(color string)
3-structural/composite/drawing-example/main.go:35
↓ 2 callersFunctionNewDoubleAttackModifier
( c *Creature)
4-behavioural/chain-of-responsibility/method-chain/main.go:57
↓ 2 callersFunctionNewEmployeeFactory
what if we want factories for specific roles? functional approach
2-creational/factories/generator/main.go:13
↓ 2 callersFunctionNewInOrderIterator
(root *Node)
4-behavioural/iterator/tree-transversal/main.go:28
↓ 2 callersFunctionNewNeuronLayer
(count int)
3-structural/composite/neural-network-example/main.go:38
↓ 2 callersFunctionNewOffState
()
4-behavioural/state/main.go:64
↓ 2 callersFunctionNewSquare
(color string)
3-structural/composite/drawing-example/main.go:39
↓ 2 callersFunctionNewTerminalNode
node without children
4-behavioural/iterator/tree-transversal/main.go:18
↓ 2 callersMethodOff
()
4-behavioural/state/main.go:23
↓ 2 callersMethodRange
(start, end int)
3-structural/flyweight/text-formatting-example/main.go:79
↓ 2 callersMethodReceive
(sender, message string)
4-behavioural/mediator/main.go:18
↓ 2 callersMethodRender
()
3-structural/decorator/main.go:13
↓ 2 callersMethodRestore
(m *Memento)
4-behavioural/memento/main.go:30
↓ 2 callersMethodScan
(d Document)
1-solid-principles/interface-segregation/main.go:53
↓ 2 callersMethodSetSucceeded
(value bool)
4-behavioural/command/composite-command/main.go:32
↓ 2 callersMethodString
()
4-behavioural/chain-of-responsibility/method-chain/main.go:10
↓ 2 callersMethodString
string method to be able to print this
4-behavioural/state/handmade-state-machine/main.go:22
↓ 2 callersMethodString
()
3-structural/composite/drawing-example/main.go:15
↓ 2 callersMethodString
()
3-structural/flyweight/text-formatting-example/main.go:18
↓ 2 callersMethodSucceeded
saving the status
4-behavioural/command/composite-command/main.go:31
↓ 2 callersMethodUndo
()
4-behavioural/memento/undo-redo/main.go:53
↓ 2 callersMethodUndo
()
4-behavioural/command/composite-command/main.go:29
↓ 2 callersMethodUndo
()
4-behavioural/command/composite-command/main.go:68
↓ 2 callersMethodUnsubscribe
(o Observer)
4-behavioural/chain-of-responsibility/broker-chain/main.go:34
↓ 2 callersFunctionUseIt
(sized Sized)
1-solid-principles/liscov-substitution/main.go:69
↓ 2 callersFunctionVectorToRaster
(vi *VectorImage)
3-structural/adapter/main.go:151
↓ 2 callersMethodWithdraw
(amount int)
4-behavioural/command/main.go:24
↓ 2 callersMethodWithdraw
(amount int)
4-behavioural/command/composite-command/main.go:17
↓ 2 callersFunctionnewEmployee
utility method for configuring emp ↓ lowercase
2-creational/prototype/factory/main.go:43
↓ 1 callersMethodAdd
(m Modifier)
4-behavioural/chain-of-responsibility/method-chain/main.go:21
↓ 1 callersMethodAddListItem
(builder *strings.Builder, item string)
4-behavioural/strategy/main.go:30
↓ 1 callersMethodAsA
( position string)
2-creational/builder/advanced/main.go:42
↓ 1 callersMethodAt
(index int)
3-structural/facade/main.go:19
↓ 1 callersMethodAttack
()
4-behavioural/chain-of-responsibility/broker-chain/main.go:72
↓ 1 callersMethodBody
(body string)
2-creational/builder/parameter/main.go:34
↓ 1 callersMethodBuild
for building the entire person
2-creational/builder/advanced/main.go:20
↓ 1 callersMethodBuild
()
2-creational/builder/functional/main.go:21
↓ 1 callersMethodCall
()
4-behavioural/command/composite-command/main.go:132
↓ 1 callersMethodCalled
(name string)
2-creational/builder/functional/main.go:14
↓ 1 callersMethodCapitalize
(start, end int)
3-structural/flyweight/text-formatting-example/main.go:36
↓ 1 callersMethodCatchACold
()
4-behavioural/observer/main.go:59
↓ 1 callersMethodConnectTo
(other *Neuron)
3-structural/composite/neural-network-example/main.go:18
↓ 1 callersMethodCovers
helper func
3-structural/flyweight/text-formatting-example/main.go:49
↓ 1 callersMethodCreate
(name string)
2-creational/factories/generator/main.go:31
↓ 1 callersMethodDeepCopy
()
2-creational/prototype/serialization/main.go:19
↓ 1 callersMethodDeepCopy
()
2-creational/prototype/factory/main.go:19
↓ 1 callersMethodDeepCopy
()
2-creational/prototype/copy-method/main.go:24
↓ 1 callersMethodDefense
()
4-behavioural/chain-of-responsibility/broker-chain/main.go:80
↓ 1 callersFunctionDeposit
(ba *BankAccount, amount int)
4-behavioural/command/functional/main.go:9
↓ 1 callersFunctionDrawImage
(image Image)
3-structural/proxy/virtual-proxy/main.go:24
↓ 1 callersFunctionDrawPoints
helper func to draw
3-structural/adapter/main.go:51
next →1–100 of 358, ranked by callers