MCPcopy Create free account

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

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

↓ 1 callersMethodDrive
()
3-structural/proxy/protection-proxy/main.go:7
↓ 1 callersMethodDrive
also implements the interface
3-structural/proxy/protection-proxy/main.go:29
↓ 1 callersMethodEarning
( annualIncome int)
2-creational/builder/advanced/main.go:48
↓ 1 callersMethodEnd
(builder *strings.Builder)
4-behavioural/strategy/main.go:29
↓ 1 callersMethodFindAllChildrenOf
(name string)
1-solid-principles/dependency-inversion/main.go:29
↓ 1 callersMethodFrom
(from string)
2-creational/builder/parameter/main.go:13
↓ 1 callersMethodGetCharacterAt
(index int)
3-structural/facade/main.go:51
↓ 1 callersMethodGetHeight
()
1-solid-principles/liscov-substitution/main.go:8
↓ 1 callersMethodGetPoints
()
3-structural/adapter/main.go:47
↓ 1 callersMethodHandle
(*Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:28
↓ 1 callersMethodHandle
calls the handle method of the modifier handles the end of the chain
4-behavioural/chain-of-responsibility/method-chain/main.go:42
↓ 1 callersMethodHaveWinner
()
4-behavioural/template-method/main.go:18
↓ 1 callersMethodIn
( city string)
2-creational/builder/advanced/main.go:71
↓ 1 callersMethodInOrder
implements the interface
4-behavioural/iterator/tree-transversal/main.go:83
↓ 1 callersMethodInvestigate
()
1-solid-principles/dependency-inversion/main.go:62
↓ 1 callersFunctionLex
first part it's converting the string into tokens (lexing part)
4-behavioural/interpreter/main.go:77
↓ 1 callersMethodLives
method to set up the location
2-creational/builder/advanced/main.go:61
↓ 1 callersMethodMessage
(src, dst, msg string)
4-behavioural/mediator/main.go:54
↓ 1 callersMethodNames
()
4-behavioural/iterator/main.go:20
↓ 1 callersFunctionNewAuxOfficeEmployee
( name string, suite int)
2-creational/prototype/factory/main.go:57
↓ 1 callersFunctionNewBankAccount
(balance int)
4-behavioural/memento/undo-redo/main.go:22
↓ 1 callersFunctionNewBetterFormattedText
the constructor
3-structural/flyweight/text-formatting-example/main.go:75
↓ 1 callersFunctionNewBinaryTree
(root *Node)
4-behavioural/iterator/tree-transversal/main.go:78
↓ 1 callersFunctionNewBitmap
when we initilize it, it it's loading the image. But we don't want to
3-structural/proxy/virtual-proxy/main.go:19
↓ 1 callersFunctionNewBuffer
(width, height int)
3-structural/facade/main.go:14
↓ 1 callersFunctionNewCarProxy
constructor
3-structural/proxy/protection-proxy/main.go:38
↓ 1 callersFunctionNewConsole
way to initialize in a default way
3-structural/facade/main.go:45
↓ 1 callersFunctionNewCreature
(game *Game, name string, attack int, defense int)
4-behavioural/chain-of-responsibility/broker-chain/main.go:68
↓ 1 callersFunctionNewCreature
(name string, attack int, defense int)
4-behavioural/chain-of-responsibility/method-chain/main.go:15
↓ 1 callersFunctionNewCreatureModifier
(creature *Creature)
4-behavioural/chain-of-responsibility/method-chain/main.go:48
↓ 1 callersFunctionNewDoubleAttackModifier
(g *Game, c *Creature)
4-behavioural/chain-of-responsibility/broker-chain/main.go:106
↓ 1 callersFunctionNewEmployee
functional
2-creational/factories/prototype/main.go:18
↓ 1 callersFunctionNewEmployeeFactory2
(position string, annualIncome int)
2-creational/factories/generator/main.go:26
↓ 1 callersFunctionNewExpressionPrinter
()
4-behavioural/visitor/classic/main.go:53
↓ 1 callersFunctionNewFormattedText
(plainText string)
3-structural/flyweight/text-formatting-example/main.go:31
↓ 1 callersFunctionNewGameOfChess
()
4-behavioural/template-method/main.go:36
↓ 1 callersFunctionNewHtmlBuilder
(rootName string)
2-creational/builder/basic/main.go:53
↓ 1 callersFunctionNewIncreasedDefenseModifier
( c *Creature)
4-behavioural/chain-of-responsibility/method-chain/main.go:67
↓ 1 callersFunctionNewLazyBitmap
(filename string)
3-structural/proxy/virtual-proxy/main.go:44
↓ 1 callersFunctionNewMainOfficeEmployee
there you jjust change the office basic object
2-creational/prototype/factory/main.go:52
↓ 1 callersFunctionNewMoneyTransferCommand
(from *BankAccount, to *BankAccount, amount int)
4-behavioural/command/composite-command/main.go:123
↓ 1 callersFunctionNewNode
(value int, left *Node, right *Node)
4-behavioural/iterator/tree-transversal/main.go:10
↓ 1 callersFunctionNewOnState
()
4-behavioural/state/main.go:48
↓ 1 callersFunctionNewPerson
(name string)
4-behavioural/observer/main.go:52
↓ 1 callersFunctionNewPerson
(age int)
4-behavioural/observer/property-dependencies/main.go:39
↓ 1 callersFunctionNewPerson
(age int)
4-behavioural/observer/property-changes/main.go:39
↓ 1 callersFunctionNewPerson
factory function: just a single function handles all the creation
2-creational/factories/function/main.go:17
↓ 1 callersFunctionNewPersonBuilder
()
2-creational/builder/advanced/main.go:15
↓ 1 callersFunctionNewRectangle
the "interface" you are given
3-structural/adapter/main.go:31
↓ 1 callersFunctionNewSquare
(size int)
1-solid-principles/liscov-substitution/main.go:42
↓ 1 callersFunctionNewSwitch
()
4-behavioural/state/main.go:15
↓ 1 callersFunctionNewTextProcessor
pass the strategy
4-behavioural/strategy/main.go:70
↓ 1 callersFunctionNewViewport
(buffer *Buffer)
3-structural/facade/main.go:29
↓ 1 callersMethodOff
(sw *Switch)
4-behavioural/state/main.go:30
↓ 1 callersMethodOn
()
4-behavioural/state/main.go:19
↓ 1 callersMethodOn
(sw *Switch)
4-behavioural/state/main.go:29
↓ 1 callersFunctionParse
final part is parse those tokens
4-behavioural/interpreter/main.go:110
↓ 1 callersFunctionPlayGame
the high-level algorithm
4-behavioural/template-method/main.go:24
↓ 1 callersFunctionPlayGame
notice that here we don't have interfaces or structs just funcs
4-behavioural/template-method/functional-approach/main.go:7
↓ 1 callersFunctionPrint
have to cast the type
4-behavioural/visitor/reflective/main.go:21
↓ 1 callersMethodPrint
it's intrusive cause you pass the sb over the hierarchy violating the open-closed principle
4-behavioural/visitor/intrusive/main.go:28
↓ 1 callersMethodPrivateMessage
(who, message string)
4-behavioural/mediator/main.go:28
↓ 1 callersMethodRedo
()
4-behavioural/memento/undo-redo/main.go:65
↓ 1 callersMethodRender
()
3-structural/decorator/main.go:20
↓ 1 callersMethodRender
()
3-structural/decorator/main.go:49
↓ 1 callersMethodRender
()
3-structural/decorator/main.go:59
↓ 1 callersMethodRenderCircle
(radius float32)
3-structural/bridge/main.go:15
↓ 1 callersFunctionSaveToFile
can work... but let's make this better
1-solid-principles/single-responsibility/main.go:53
↓ 1 callersMethodScan
(d Document)
1-solid-principles/interface-segregation/main.go:10
↓ 1 callersFunctionSendEmail
this actually have access to the email
2-creational/builder/parameter/main.go:47
↓ 1 callersMethodSetAge
(age int)
4-behavioural/observer/property-dependencies/main.go:55
↓ 1 callersMethodSetAge
(age int)
4-behavioural/observer/property-changes/main.go:52
↓ 1 callersMethodSetHeight
(height int)
1-solid-principles/liscov-substitution/main.go:9
↓ 1 callersMethodSetOutputFormat
redefine strategy
4-behavioural/strategy/main.go:75
↓ 1 callersMethodStart
(builder *strings.Builder)
4-behavioural/strategy/main.go:28
↓ 1 callersMethodStart
()
4-behavioural/template-method/main.go:17
↓ 1 callersMethodString
string method to be able to print this entity well :)
1-solid-principles/single-responsibility/main.go:17
↓ 1 callersMethodString
()
4-behavioural/interpreter/main.go:72
↓ 1 callersMethodString
()
3-structural/flyweight/text-formatting-example/main.go:58
↓ 1 callersMethodString
()
2-creational/builder/basic/main.go:59
↓ 1 callersMethodSubject
(subject string)
2-creational/builder/parameter/main.go:28
↓ 1 callersMethodTakeTurn
()
4-behavioural/template-method/main.go:19
↓ 1 callersMethodTo
(to string)
2-creational/builder/parameter/main.go:23
↓ 1 callersMethodVisitAdditionExpression
(ae *AdditionExpression)
4-behavioural/visitor/classic/main.go:10
↓ 1 callersMethodVisitAdditionExpression
(ae *AdditionExpression)
4-behavioural/visitor/classic/main.go:45
↓ 1 callersMethodVisitDoubleExpression
(de *DoubleExpression)
4-behavioural/visitor/classic/main.go:9
↓ 1 callersMethodWinningPlayer
()
4-behavioural/template-method/main.go:20
↓ 1 callersMethodWithPostcode
( postcode string)
2-creational/builder/advanced/main.go:77
↓ 1 callersFunctionWithdraw
(ba *BankAccount, amount int)
4-behavioural/command/functional/main.go:14
↓ 1 callersMethodWorks
returns the job builder
2-creational/builder/advanced/main.go:31
↓ 1 callersMethodWorksAsA
extend PersonBuilder
2-creational/builder/functional/main.go:30
↓ 1 callersMethodaddLineCached
(line Line)
3-structural/adapter/main.go:114
↓ 1 callersMethodfilterByColor
now we can filter by color
1-solid-principles/open-closed/main.go:32
↓ 1 callersMethodprint
(sb *strings.Builder, depth int)
3-structural/composite/drawing-example/main.go:21
↓ 1 callersFunctionreadData
init() — we could, but it's not lazy
2-creational/singleton/main.go:49
↓ 1 callersMethodsaveToFile
(j *Journal, filename string)
1-solid-principles/single-responsibility/main.go:63
↓ 1 callersFunctionsendMailImpl
(email *email)
2-creational/builder/parameter/main.go:40
↓ 1 callersMethodstring
string method to print this as HTML
2-creational/builder/basic/main.go:27
MethodAccept
if double expresion
4-behavioural/visitor/classic/main.go:23
MethodAccept
if addition expression
4-behavioural/visitor/classic/main.go:32
← previousnext →101–200 of 358, ranked by callers