MCPcopy Create free account

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

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

MethodAddChild
( childName, childText string)
2-creational/builder/basic/main.go:63
MethodAddListItem
( builder *strings.Builder, item string)
4-behavioural/strategy/main.go:43
MethodAddListItem
(builder *strings.Builder, item string)
4-behavioural/strategy/main.go:59
MethodAge
()
4-behavioural/observer/property-dependencies/main.go:53
MethodAge
getters and setters
4-behavioural/observer/property-changes/main.go:50
MethodAt
( streetAddress string)
2-creational/builder/advanced/main.go:65
MethodCall
()
4-behavioural/command/main.go:36
MethodCall
()
4-behavioural/command/composite-command/main.go:100
MethodDeepCopy
this solves the problems with the deep-copy method in the other folder cause initializes a new Address
2-creational/prototype/copy-method/main.go:11
MethodDraw
()
3-structural/proxy/virtual-proxy/main.go:14
MethodDraw
()
3-structural/proxy/virtual-proxy/main.go:36
MethodDrive
implements the interface
3-structural/proxy/protection-proxy/main.go:13
MethodEnd
(builder *strings.Builder)
4-behavioural/strategy/main.go:40
MethodEnd
(builder *strings.Builder)
4-behavioural/strategy/main.go:55
MethodFax
(d Document)
1-solid-principles/interface-segregation/main.go:9
MethodFax
(d Document)
1-solid-principles/interface-segregation/main.go:22
MethodFax
(d Document)
1-solid-principles/interface-segregation/main.go:38
MethodFindAllChildrenOf
(name string)
1-solid-principles/dependency-inversion/main.go:36
MethodFire
(q *Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:52
MethodFire
notify method for all the subscribers
4-behavioural/observer/main.go:34
MethodFire
(data interface{})
4-behavioural/observer/property-dependencies/main.go:24
MethodFire
(data interface{})
4-behavioural/observer/property-changes/main.go:24
MethodGetCharacterAt
(index int)
3-structural/facade/main.go:33
MethodGetHeight
()
1-solid-principles/liscov-substitution/main.go:25
MethodGetPoints
()
3-structural/adapter/main.go:147
MethodGetPopulation
( name string)
2-creational/singleton/main.go:24
MethodGetPopulation
(name string)
2-creational/singleton/main.go:110
FunctionGetTotalPopulation
this breaks the dependency inversion principle cause we are reliying on live data we want to rely on abstractions then we can test
2-creational/singleton/main.go:88
MethodGetWidth
vvv !! POINTER
1-solid-principles/liscov-substitution/main.go:17
MethodHandle
(*Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:98
MethodHandle
(q *Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:113
MethodHandle
the hanlder
4-behavioural/chain-of-responsibility/method-chain/main.go:74
MethodHandle
()
4-behavioural/chain-of-responsibility/method-chain/main.go:85
MethodHandle
if fact this will anulate the other modifiers if added
4-behavioural/chain-of-responsibility/method-chain/main.go:103
MethodHaveWinner
()
4-behavioural/template-method/main.go:45
MethodIsSatisfied
(p *Product)
1-solid-principles/open-closed/main.go:85
MethodIsSatisfied
(p *Product)
1-solid-principles/open-closed/main.go:93
MethodIsSatisfied
(p *Product)
1-solid-principles/open-closed/main.go:101
MethodIter
return itself
3-structural/composite/neural-network-example/main.go:14
MethodIter
but implements the Iter
3-structural/composite/neural-network-example/main.go:29
MethodLoad
(filename string)
1-solid-principles/single-responsibility/main.go:42
MethodLoadFromWeb
(url *url.URL)
1-solid-principles/single-responsibility/main.go:46
FunctionNewInteger
(value int)
4-behavioural/interpreter/main.go:24
FunctionNewNoBonusesModifier
( c *Creature)
4-behavioural/chain-of-responsibility/method-chain/main.go:96
MethodNotify
(data interface{})
4-behavioural/observer/main.go:42
MethodNotify
actually what happens when it gets notified
4-behavioural/observer/main.go:67
MethodNotify
(data interface{})
4-behavioural/observer/property-dependencies/main.go:31
MethodNotify
(data interface{})
4-behavioural/observer/property-dependencies/main.go:76
MethodNotify
(data interface{})
4-behavioural/observer/property-changes/main.go:65
MethodOff
(sw *Switch)
4-behavioural/state/main.go:40
MethodOff
in on state we just can go off
4-behavioural/state/main.go:54
MethodOn
(sw *Switch)
4-behavioural/state/main.go:36
MethodOn
in off state we just can go on
4-behavioural/state/main.go:70
MethodPrint
(d Document)
1-solid-principles/interface-segregation/main.go:18
MethodPrint
(d Document)
1-solid-principles/interface-segregation/main.go:34
MethodPrint
(d Document)
1-solid-principles/interface-segregation/main.go:49
MethodPrint
(d Document)
1-solid-principles/interface-segregation/main.go:61
MethodPrint
(d Document)
1-solid-principles/interface-segregation/main.go:72
MethodPrint
(d Document)
1-solid-principles/interface-segregation/main.go:87
MethodPrint
just prints the value
4-behavioural/visitor/intrusive/main.go:18
MethodRectangle
this is pretty much a correct extension, cause rectangle will continue working
1-solid-principles/liscov-substitution/main.go:65
MethodRemoveEntry
(index int)
1-solid-principles/single-responsibility/main.go:30
MethodRender
()
3-structural/decorator/main.go:33
MethodRenderCircle
(radius float32)
3-structural/bridge/main.go:22
MethodRenderCircle
(radius float32)
3-structural/bridge/main.go:31
MethodReset
()
4-behavioural/iterator/tree-transversal/main.go:41
MethodResize
(factor float32)
3-structural/decorator/main.go:25
MethodResize
(factor float32)
3-structural/bridge/main.go:51
MethodRestore
(m *Memento)
4-behavioural/memento/undo-redo/main.go:44
MethodSave
those three methods breaks the single responsibility design pattern cause the responsiblity for Journal should not be to save or load info but just to
1-solid-principles/single-responsibility/main.go:37
MethodScan
(d Document)
1-solid-principles/interface-segregation/main.go:26
MethodScan
Deprecated: ...
1-solid-principles/interface-segregation/main.go:43
MethodScan
(d Document)
1-solid-principles/interface-segregation/main.go:68
MethodScan
(d Document)
1-solid-principles/interface-segregation/main.go:91
MethodSetHeight
(height int)
1-solid-principles/liscov-substitution/main.go:29
MethodSetHeight
(height int)
1-solid-principles/liscov-substitution/main.go:54
MethodSetSucceeded
(value bool)
4-behavioural/command/composite-command/main.go:49
MethodSetSucceeded
(value bool)
4-behavioural/command/composite-command/main.go:94
MethodSetWidth
(width int)
1-solid-principles/liscov-substitution/main.go:7
MethodSetWidth
(width int)
1-solid-principles/liscov-substitution/main.go:21
MethodSetWidth
(width int)
1-solid-principles/liscov-substitution/main.go:49
MethodStart
start and end empty cause in markdown we don't need them
4-behavioural/strategy/main.go:36
MethodStart
in html we need to define the tags
4-behavioural/strategy/main.go:51
MethodStart
the implementations of the methods
4-behavioural/template-method/main.go:41
MethodString
()
4-behavioural/strategy/main.go:97
MethodString
()
4-behavioural/memento/undo-redo/main.go:17
MethodString
()
4-behavioural/state/handmade-state-machine/main.go:50
MethodSubscribe
(o Observer)
4-behavioural/chain-of-responsibility/broker-chain/main.go:43
MethodSubscribe
provide methods to subscribe and unsubscribe as well
4-behavioural/observer/main.go:21
MethodSubscribe
(x Observer)
4-behavioural/observer/property-dependencies/main.go:12
MethodSubscribe
(x Observer)
4-behavioural/observer/property-changes/main.go:12
MethodSucceeded
additional member
4-behavioural/command/composite-command/main.go:54
MethodSucceeded
()
4-behavioural/command/composite-command/main.go:85
MethodTakeTurn
()
4-behavioural/template-method/main.go:49
MethodUndo
()
4-behavioural/command/main.go:37
MethodUndo
()
4-behavioural/command/main.go:65
MethodUndo
()
4-behavioural/command/composite-command/main.go:106
MethodUnsubscribe
(o Observer)
4-behavioural/chain-of-responsibility/broker-chain/main.go:48
MethodUnsubscribe
(x Observer)
4-behavioural/observer/main.go:25
MethodUnsubscribe
(x Observer)
4-behavioural/observer/property-dependencies/main.go:16
← previousnext →201–300 of 358, ranked by callers