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
Method
AddChild
( childName, childText string)
2-creational/builder/basic/main.go:63
Method
AddListItem
( builder *strings.Builder, item string)
4-behavioural/strategy/main.go:43
Method
AddListItem
(builder *strings.Builder, item string)
4-behavioural/strategy/main.go:59
Method
Age
()
4-behavioural/observer/property-dependencies/main.go:53
Method
Age
getters and setters
4-behavioural/observer/property-changes/main.go:50
Method
At
( streetAddress string)
2-creational/builder/advanced/main.go:65
Method
Call
()
4-behavioural/command/main.go:36
Method
Call
()
4-behavioural/command/composite-command/main.go:100
Method
DeepCopy
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
Method
Draw
()
3-structural/proxy/virtual-proxy/main.go:14
Method
Draw
()
3-structural/proxy/virtual-proxy/main.go:36
Method
Drive
implements the interface
3-structural/proxy/protection-proxy/main.go:13
Method
End
(builder *strings.Builder)
4-behavioural/strategy/main.go:40
Method
End
(builder *strings.Builder)
4-behavioural/strategy/main.go:55
Method
Fax
(d Document)
1-solid-principles/interface-segregation/main.go:9
Method
Fax
(d Document)
1-solid-principles/interface-segregation/main.go:22
Method
Fax
(d Document)
1-solid-principles/interface-segregation/main.go:38
Method
FindAllChildrenOf
(name string)
1-solid-principles/dependency-inversion/main.go:36
Method
Fire
(q *Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:52
Method
Fire
notify method for all the subscribers
4-behavioural/observer/main.go:34
Method
Fire
(data interface{})
4-behavioural/observer/property-dependencies/main.go:24
Method
Fire
(data interface{})
4-behavioural/observer/property-changes/main.go:24
Method
GetCharacterAt
(index int)
3-structural/facade/main.go:33
Method
GetHeight
()
1-solid-principles/liscov-substitution/main.go:25
Method
GetPoints
()
3-structural/adapter/main.go:147
Method
GetPopulation
( name string)
2-creational/singleton/main.go:24
Method
GetPopulation
(name string)
2-creational/singleton/main.go:110
Function
GetTotalPopulation
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
Method
GetWidth
vvv !! POINTER
1-solid-principles/liscov-substitution/main.go:17
Method
Handle
(*Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:98
Method
Handle
(q *Query)
4-behavioural/chain-of-responsibility/broker-chain/main.go:113
Method
Handle
the hanlder
4-behavioural/chain-of-responsibility/method-chain/main.go:74
Method
Handle
()
4-behavioural/chain-of-responsibility/method-chain/main.go:85
Method
Handle
if fact this will anulate the other modifiers if added
4-behavioural/chain-of-responsibility/method-chain/main.go:103
Method
HaveWinner
()
4-behavioural/template-method/main.go:45
Method
IsSatisfied
(p *Product)
1-solid-principles/open-closed/main.go:85
Method
IsSatisfied
(p *Product)
1-solid-principles/open-closed/main.go:93
Method
IsSatisfied
(p *Product)
1-solid-principles/open-closed/main.go:101
Method
Iter
return itself
3-structural/composite/neural-network-example/main.go:14
Method
Iter
but implements the Iter
3-structural/composite/neural-network-example/main.go:29
Method
Load
(filename string)
1-solid-principles/single-responsibility/main.go:42
Method
LoadFromWeb
(url *url.URL)
1-solid-principles/single-responsibility/main.go:46
Function
NewInteger
(value int)
4-behavioural/interpreter/main.go:24
Function
NewNoBonusesModifier
( c *Creature)
4-behavioural/chain-of-responsibility/method-chain/main.go:96
Method
Notify
(data interface{})
4-behavioural/observer/main.go:42
Method
Notify
actually what happens when it gets notified
4-behavioural/observer/main.go:67
Method
Notify
(data interface{})
4-behavioural/observer/property-dependencies/main.go:31
Method
Notify
(data interface{})
4-behavioural/observer/property-dependencies/main.go:76
Method
Notify
(data interface{})
4-behavioural/observer/property-changes/main.go:65
Method
Off
(sw *Switch)
4-behavioural/state/main.go:40
Method
Off
in on state we just can go off
4-behavioural/state/main.go:54
Method
On
(sw *Switch)
4-behavioural/state/main.go:36
Method
On
in off state we just can go on
4-behavioural/state/main.go:70
Method
Print
(d Document)
1-solid-principles/interface-segregation/main.go:18
Method
Print
(d Document)
1-solid-principles/interface-segregation/main.go:34
Method
Print
(d Document)
1-solid-principles/interface-segregation/main.go:49
Method
Print
(d Document)
1-solid-principles/interface-segregation/main.go:61
Method
Print
(d Document)
1-solid-principles/interface-segregation/main.go:72
Method
Print
(d Document)
1-solid-principles/interface-segregation/main.go:87
Method
Print
just prints the value
4-behavioural/visitor/intrusive/main.go:18
Method
Rectangle
this is pretty much a correct extension, cause rectangle will continue working
1-solid-principles/liscov-substitution/main.go:65
Method
RemoveEntry
(index int)
1-solid-principles/single-responsibility/main.go:30
Method
Render
()
3-structural/decorator/main.go:33
Method
RenderCircle
(radius float32)
3-structural/bridge/main.go:22
Method
RenderCircle
(radius float32)
3-structural/bridge/main.go:31
Method
Reset
()
4-behavioural/iterator/tree-transversal/main.go:41
Method
Resize
(factor float32)
3-structural/decorator/main.go:25
Method
Resize
(factor float32)
3-structural/bridge/main.go:51
Method
Restore
(m *Memento)
4-behavioural/memento/undo-redo/main.go:44
Method
Save
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
Method
Scan
(d Document)
1-solid-principles/interface-segregation/main.go:26
Method
Scan
Deprecated: ...
1-solid-principles/interface-segregation/main.go:43
Method
Scan
(d Document)
1-solid-principles/interface-segregation/main.go:68
Method
Scan
(d Document)
1-solid-principles/interface-segregation/main.go:91
Method
SetHeight
(height int)
1-solid-principles/liscov-substitution/main.go:29
Method
SetHeight
(height int)
1-solid-principles/liscov-substitution/main.go:54
Method
SetSucceeded
(value bool)
4-behavioural/command/composite-command/main.go:49
Method
SetSucceeded
(value bool)
4-behavioural/command/composite-command/main.go:94
Method
SetWidth
(width int)
1-solid-principles/liscov-substitution/main.go:7
Method
SetWidth
(width int)
1-solid-principles/liscov-substitution/main.go:21
Method
SetWidth
(width int)
1-solid-principles/liscov-substitution/main.go:49
Method
Start
start and end empty cause in markdown we don't need them
4-behavioural/strategy/main.go:36
Method
Start
in html we need to define the tags
4-behavioural/strategy/main.go:51
Method
Start
the implementations of the methods
4-behavioural/template-method/main.go:41
Method
String
()
4-behavioural/strategy/main.go:97
Method
String
()
4-behavioural/memento/undo-redo/main.go:17
Method
String
()
4-behavioural/state/handmade-state-machine/main.go:50
Method
Subscribe
(o Observer)
4-behavioural/chain-of-responsibility/broker-chain/main.go:43
Method
Subscribe
provide methods to subscribe and unsubscribe as well
4-behavioural/observer/main.go:21
Method
Subscribe
(x Observer)
4-behavioural/observer/property-dependencies/main.go:12
Method
Subscribe
(x Observer)
4-behavioural/observer/property-changes/main.go:12
Method
Succeeded
additional member
4-behavioural/command/composite-command/main.go:54
Method
Succeeded
()
4-behavioural/command/composite-command/main.go:85
Method
TakeTurn
()
4-behavioural/template-method/main.go:49
Method
Undo
()
4-behavioural/command/main.go:37
Method
Undo
()
4-behavioural/command/main.go:65
Method
Undo
()
4-behavioural/command/composite-command/main.go:106
Method
Unsubscribe
(o Observer)
4-behavioural/chain-of-responsibility/broker-chain/main.go:48
Method
Unsubscribe
(x Observer)
4-behavioural/observer/main.go:25
Method
Unsubscribe
(x Observer)
4-behavioural/observer/property-dependencies/main.go:16
← previous
next →
201–300 of 358, ranked by callers