MCPcopy Create free account

hub / github.com/crazybber/awesome-patterns / functions

Functions583 in github.com/crazybber/awesome-patterns

MethodSpeak
()
playground/benchmark/main.go:15
MethodStart
(player string)
behavioral/chain_of_responsibility/main.go:37
MethodStart
(player string)
behavioral/chain_of_responsibility/main.go:49
MethodStart
(ctx context.Context)
messaging/fanout.go:26
MethodStart
Start runs all tasks and monitors channel events.
concurrency/runner/main.go:56
MethodSubscribe
添加一个新的订阅者,订阅全部主题
messaging/pubsub/main.go:64
MethodTask
Task implements the Worker interface.
concurrency/worker_unbuffed/main.go:103
FunctionTestBarrier
(t *testing.T)
concurrency/barrier/main_test.go:5
FunctionTestBuilderPatter
(t *testing.T)
creational/builder/builder/main_test.go:7
FunctionTestCarFactory
(t *testing.T)
creational/abstract_factory/main_test.go:7
FunctionTestCborEncode
(t *testing.T)
playground/cbor/cbor_test.go:17
FunctionTestCborEncode2
(t *testing.T)
playground/cbor/cbor2_test.go:16
FunctionTestCborEncode3
(t *testing.T)
playground/cbor/cbor3_test.go:11
FunctionTestCronWithAddFunc
(t *testing.T)
playground/cron/cron_test.go:57
FunctionTestCronWithAddJob
(t *testing.T)
playground/cron/cron_test.go:21
FunctionTestDeadline
(t *testing.T)
stability/deadline/deadline_test.go:29
FunctionTestDeadlock
A deadlock happens when a group of goroutines are waiting for each other and none of them is able to proceed. The program will get stuck on the channe
playground/goroutine/deadlock_test.go:8
FunctionTestFiveGopher
(t *testing.T)
playground/goroutine/basic_test.go:14
FunctionTestFiveGopherWithChan
(t *testing.T)
playground/goroutine/basic_chan_test.go:9
FunctionTestGet
(t *testing.T)
playground/http/get_test.go:14
FunctionTestGo
想弄清楚slice遍历时被修改到底会发生什么. 结果是安全失败. 并不意味着是线程安全的.
behavioral/chain_of_responsibility/go_test.go:13
FunctionTestMakeRobotsSayHi
(t *testing.T)
playground/mocklib/robot_test.go:13
FunctionTestMergeNumbersSeq
(T *testing.T)
messaging/fan/fan_in_out_test.go:9
FunctionTestOneGopher
(t *testing.T)
playground/goroutine/basic_test.go:9
FunctionTestParse
(t *testing.T)
data/xml/xml_test.go:15
FunctionTestParseISO8601
(t *testing.T)
playground/cron/cron_test.go:77
FunctionTestParseInt
(t *testing.T)
playground/parse/parseInt_test.go:9
FunctionTestPipeline
Pipeline source->filter->print
playground/goroutine/pipeline_test.go:33
FunctionTestPostYamlString
(t *testing.T)
playground/http/postyamlstring_test.go:11
FunctionTestPrintAddress
(t *testing.T)
playground/basic/address_test.go:8
FunctionTestSay
(t *testing.T)
playground/factory/robot_test.go:5
FunctionTestSize
(t *testing.T)
playground/codecoverage/size_test.go:19
FunctionTestStartRobots
(t *testing.T)
playground/mocklib/robot_test.go:9
FunctionTestStringorError_Execute
(t *testing.T)
messaging/future/future/main_test.go:6
FunctionTestStructAddress
(t *testing.T)
playground/basic/address_test.go:26
FunctionTestSync
(t *testing.T)
playground/syncmap/syncmap_test.go:13
FunctionTestSync2
(t *testing.T)
playground/syncmap/syncmap_test.go:30
FunctionTestSync3
(t *testing.T)
playground/syncmap/syncmap_test.go:42
FunctionTestUploadFormFile
(t *testing.T)
playground/http/upload_test.go:14
FunctionTestWaitGophers
(t *testing.T)
playground/goroutine/basic_waitgroup_test.go:10
FunctionTry
()
playground/panic/trypanic.go:7
MethodType
()
behavioral/chain_of_responsibility/main.go:41
MethodType
()
behavioral/chain_of_responsibility/main.go:53
MethodUpdate
(s AbstractSubject)
behavioral/observerpattern/main.go:23
MethodUpdates
STARTUPDATES OMIT
concurrency/feedreader/main.go:62
MethodUpdates
STOPNAIVEMERGECLOSE OMIT
concurrency/feedreader/main.go:351
MethodUpdates
()
concurrency/feedreader/main.go:397
MethodUpdates
()
concurrency/feedreader/main.go:485
MethodVisitNPC
(n NPCHost)
behavioral/visitor/main.go:55
MethodVisitNPC
(n NPCHost)
behavioral/visitor/main.go:70
MethodVisitObject
(o ObjectHost)
behavioral/visitor/main.go:59
MethodVisitObject
(o ObjectHost)
behavioral/visitor/main.go:74
MethodVisitPlayer
(p PlayerHost)
behavioral/visitor/main.go:51
MethodVisitPlayer
(p PlayerHost)
behavioral/visitor/main.go:66
Functionadd
(n int)
functions/main.go:11
FunctionappendInt
(x []int, y int)
playground/slice/slice.go:16
FunctionarrayEach
(value []byte, dataType jsonparser.ValueType, offset int, err error)
data/xml/xml_test.go:61
Functionblock
The deferred func above will only run when the func ends not when the deferred func’s surrounding block ends (the area inside curly braces containing
playground/defer/main.go:28
FunctionblockOnAttemptingToWriteToChannel
()
concurrency/confinement/lexical/main.go:77
Functionbuf
()
channel/basic/main.go:29
Functioncaller
()
concurrency/subtasks/main.go:47
FunctioncreateConnection
createConnection is a factory method that will be called by the pool when a new connection is needed.
workerpool/pool/main.go:154
MethoddedupeLoop
dedupeLoop extends mergedLoop with deduping of fetched items.
concurrency/feedreader/main.go:191
FunctiondeferInsideLoop
Do not use defer inside a loop unless you are sure about what you are doing. It may not work as expected. However, in some situations it will be handy
playground/defer/main.go:17
FunctiondeferStruct
So, when a method with a value-receiver is used with defer, the receiver will be copied (in this case Car) at the time of registering and the changes
playground/defer/main.go:56
Functionfanout
()
channel/behavior_of_channel/main.go:29
Functioninit
()
shadow/main.go:9
Functioninit
()
playground/factory/robotfuncs.go:13
Functioninit
TODO: in a longer talk: move the Subscribe function onto a Reader type, to support dynamically adding and removing Subscriptions. Reader should dedup
concurrency/feedreader/main.go:577
Functioninit
init is called when the system is inited.
workerpool/ardan_labs_worker_pool/worker_pool.go:125
FunctionlexicalDemo
()
concurrency/confinement/lexical/main.go:26
FunctionlexicalNotConcurrentSafe
()
concurrency/confinement/lexical/main.go:58
MethodloopCloseOnly
STOPCLOSE OMIT loopCloseOnly is a version of loop that includes only the logic that handles Close.
concurrency/feedreader/main.go:81
MethodloopFetchOnly
loopFetchOnly is a version of loop that includes only the logic that calls Fetch.
concurrency/feedreader/main.go:97
MethodloopSendOnly
loopSendOnly is a version of loop that includes only the logic for sending items to s.updates.
concurrency/feedreader/main.go:125
Functionlooprint
(count int)
synchronization/waitgroup/main.go:19
Functionmain
()
behavioral/strategy/main.go:28
Functionmain
()
behavioral/memento/main.go:62
Functionmain
()
behavioral/interpreter/main.go:8
Functionmain
()
behavioral/command/main.go:63
Functionmain
()
behavioral/chain_of_responsibility/main.go:57
Functionmain
()
behavioral/state/main.go:54
Functionmain
()
behavioral/mediator/main.go:52
Functionmain
()
behavioral/observerpattern/main.go:62
Functionmain
()
behavioral/visitor/main.go:78
Functionmain
()
behavioral/template/main.go:40
Functionmain
()
behavioral/observer/main.go:72
Functionmain
()
messaging/future/main.go:32
Functionmain
()
messaging/future/future/main.go:3
Functionmain
()
messaging/future/futurev1/main.go:30
Functionmain
* There's no formal definition of a pipeline in Go; it's just one of many kinds of concurrent programs. Informally, a pipeline is a series of stages c
messaging/fan_in_out/main.go:22
Functionmain
**在发布订阅模型中,每条消息都会传送给多个订阅者。发布者通常不会知道、也不关心哪一 个订阅者正在接收主题消息。订阅者和发布者可以在运行时动态添加是一种松散的耦合关 心,这使得系统的复杂性可以随时间的推移而增长。在现实生活中,不同城市的象天气预报 之类的应用就可以应用这个并发模式。 */
messaging/pubsub/main.go:15
Functionmain
()
shadow/main.go:15
Functionmain
()
data/graphql/main.go:11
Functionmain
()
structural/decorator/decorate.go:23
Functionmain
()
structural/bridge/main.go:62
Functionmain
()
structural/composite/main.go:26
Functionmain
()
structural/facade/main.go:58
Functionmain
For example: we must a execute some command so before that we must to create new terminal session and provide our user name and command
structural/proxy/main.go:11
Functionmain
()
structural/flyweight/main.go:26
← previousnext →401–500 of 583, ranked by callers