Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/crazybber/awesome-patterns
/ functions
Functions
583 in github.com/crazybber/awesome-patterns
⨍
Functions
583
◇
Types & classes
195
↓ 1 callers
Method
Evaluate
(data interface{})
concurrency/subtasks/divide_and_conquer/divide_and_conquer.go:60
↓ 1 callers
Method
Execute
()
behavioral/command/main.go:8
↓ 1 callers
Method
Execute
(cmd string)
structural/proxy/main.go:37
↓ 1 callers
Method
Execute
Execute intercepts execution of command, implements authorizing user, validates it and poxing command to real terminal (gopherTerminal) method
structural/proxy/main.go:98
↓ 1 callers
Function
FetchResults
(url string, fetchers []Fetcher, timeout time.Duration)
concurrency/subtasks/fetchers/fetchers.go:65
↓ 1 callers
Function
FibMemoized
(n int)
functions/fibonacci.go:21
↓ 1 callers
Method
GetFav
()
behavioral/observerpattern/main.go:17
↓ 1 callers
Function
GetInstance
()
creational/singleton/singleton.go:18
↓ 1 callers
Method
GetName
()
concurrency/subtasks/fetchers/fetchers.go:12
↓ 1 callers
Function
GetPaymentMethod
(m int)
creational/factorymethod/main.go:31
↓ 1 callers
Method
GetTop
()
playground/generic_data_structure/main.go:30
↓ 1 callers
Method
GetVehicle
()
creational/builder/builder/main.go:59
↓ 1 callers
Method
GetVehicle
()
creational/builder/builder/main.go:82
↓ 1 callers
Method
Heal
(p *Player)
behavioral/state/problem.go:19
↓ 1 callers
Method
Hurt
(p *Player ,dmg int)
behavioral/state/problem.go:20
↓ 1 callers
Function
InterfacePresentation
(vs ...interface{})
playground/benchmark/main.go:19
↓ 1 callers
Method
Legs
()
openclose/main.go:9
↓ 1 callers
Method
Legs
()
openclose/main.go:21
↓ 1 callers
Method
LiftLeftSide
(S *Seesaw)
behavioral/state/main.go:15
↓ 1 callers
Method
LiftRightSide
(S *Seesaw)
behavioral/state/main.go:16
↓ 1 callers
Function
LogDecorate
(fn Object)
structural/decorator/decorate.go:7
↓ 1 callers
Function
MD5All
MD5All reads all the files in the file tree rooted at root and returns a map from file path to the MD5 sum of the file's contents. If the directory w
concurrency/parallelism.go:72
↓ 1 callers
Function
MD5All
MD5All reads all the files in the file tree rooted at root and returns a map from file path to the MD5 sum of the file's contents. If the directory w
concurrency/bounded/bounded_parallelism.go:66
↓ 1 callers
Method
MakeLeftUp
()
behavioral/state/main.go:46
↓ 1 callers
Method
MakeRightUp
()
behavioral/state/main.go:50
↓ 1 callers
Method
MakeSound
()
playground/defer/main.go:49
↓ 1 callers
Function
Memoize
(mf Memoized)
functions/fibonacci.go:9
↓ 1 callers
Function
Merge
STARTMERGESIG OMIT Merge returns a Subscription that merges the item streams from subs. Closing the merged subscription closes subs.
concurrency/feedreader/main.go:365
↓ 1 callers
Function
New
(total int)
creational/object_pool.go:5
↓ 1 callers
Function
New
New returns a new ready-to-use Runner.
concurrency/runner/main.go:41
↓ 1 callers
Function
New
New creates a new work pool.
concurrency/worker_unbuffed/main.go:41
↓ 1 callers
Function
New
New creates a pool that manage resources. A pool requires a function that can allocate a new resource and the size of the pool. The function parameter
workerpool/pool/main.go:46
↓ 1 callers
Function
New
New creates a new WorkPool.
workerpool/ardan_labs_worker_pool/worker_pool.go:131
↓ 1 callers
Function
New
(tickets int, timeout time.Duration)
synchronization/semaphore2/main.go:57
↓ 1 callers
Function
NewBingFetcher
(name string)
concurrency/subtasks/fetchers/fetchers.go:45
↓ 1 callers
Function
NewChanBarrier
(gos int)
concurrency/barrier/n_barrier/main.go:20
↓ 1 callers
Function
NewDuckDuckGoFetcherFetcher
(name string)
concurrency/subtasks/fetchers/fetchers.go:62
↓ 1 callers
Function
NewFetcher
NewFetcher returns a Fetcher for uri.
concurrency/feedreader/main.go:542
↓ 1 callers
Function
NewGoogleFetcher
(name string)
concurrency/subtasks/fetchers/fetchers.go:28
↓ 1 callers
Function
NewPool
(tasks []*Task, concurrency int)
workerpool/main.go:42
↓ 1 callers
Function
NewPublisher
构建一个发布者对象, 可以设置发布超时时间和缓存队列的长度
messaging/pubsub/main.go:55
↓ 1 callers
Function
NewStore
(t StorageType)
creational/factory_method.go:18
↓ 1 callers
Function
NewTerminal
NewTerminal creates new instance of terminal
structural/proxy/main.go:77
↓ 1 callers
Method
NewVehicle
(v int)
creational/abstract_factory/vehicle_factory.go:4
↓ 1 callers
Method
Notify
()
behavioral/observerpattern/main.go:47
↓ 1 callers
Method
Notify
(e Event)
behavioral/observer/main.go:66
↓ 1 callers
Method
NumDoors
()
creational/abstract_factory/car.go:4
↓ 1 callers
Method
NumSeats
()
creational/abstract_factory/vehicle.go:5
↓ 1 callers
Method
NumWheels
()
creational/abstract_factory/vehicle.go:4
↓ 1 callers
Method
OnEnd
()
behavioral/template/main.go:10
↓ 1 callers
Method
OnNotify
OnNotify allows an event to be "published" to interface implementations. In the "real world", error handling would likely be implemented.
behavioral/observer/main.go:23
↓ 1 callers
Method
OnStart
()
behavioral/template/main.go:9
↓ 1 callers
Method
Pay
(amount float32)
creational/factorymethod/main.go:11
↓ 1 callers
Method
PostWork
PostWork will post work into the WorkPool. This call will block until the Queue routine reports back success or failure that the work is in queue.
workerpool/ardan_labs_worker_pool/worker_pool.go:183
↓ 1 callers
Method
PrintLegs
()
openclose/main.go:13
↓ 1 callers
Method
PrintModel
()
playground/defer/main.go:41
↓ 1 callers
Method
Process
(interface{})
messaging/fanout.go:71
↓ 1 callers
Method
PushCommands
(c ...GameCommand)
behavioral/command/main.go:57
↓ 1 callers
Method
QueuedWork
QueuedWork will return the number of work items in queue.
workerpool/ardan_labs_worker_pool/worker_pool.go:197
↓ 1 callers
Function
Read
()
concurrency/read_struct_props/main.go:52
↓ 1 callers
Method
Run
Run runs all work within the pool and blocks until it's finished.
workerpool/main.go:52
↓ 1 callers
Method
Shutdown
Shutdown waits for all the goroutines to shutdown. The Shutdown method in listing 7.33 does two things. First, it closes the work channel, which cause
concurrency/worker_unbuffed/main.go:81
↓ 1 callers
Method
Shutdown
Shutdown will release resources and shutdown all processing.
workerpool/ardan_labs_worker_pool/worker_pool.go:157
↓ 1 callers
Function
Size
(a int)
playground/codecoverage/size.go:3
↓ 1 callers
Function
StartRobots
()
playground/mocklib/robot.go:26
↓ 1 callers
Method
Task
()
concurrency/worker_unbuffed/main.go:26
↓ 1 callers
Method
Type
()
behavioral/chain_of_responsibility/main.go:11
↓ 1 callers
Method
Update
(abstractSubject AbstractSubject)
behavioral/observerpattern/main.go:10
↓ 1 callers
Method
VisitNPC
(NPCHost)
behavioral/visitor/main.go:43
↓ 1 callers
Method
VisitObject
(ObjectHost)
behavioral/visitor/main.go:44
↓ 1 callers
Method
VisitPlayer
(PlayerHost)
behavioral/visitor/main.go:42
↓ 1 callers
Function
Write
()
concurrency/read_struct_props/main.go:58
↓ 1 callers
Function
add
(done <-chan interface{}, intStream <-chan int, additive int)
concurrency/pipeline/pipeline_from_book/main.go:49
↓ 1 callers
Function
addToScrapedText
(textChannel chan string, processChannel chan bool)
concurrency/concurrency_in_go/ch1/spider.go:35
↓ 1 callers
Function
authorizeUser
authorize validates user right to execute commands
structural/proxy/main.go:117
↓ 1 callers
Function
barrier
(endpoints ...string)
concurrency/barrier/main.go:21
↓ 1 callers
Function
cancellationSignal
The way to successfully mitigate this is to establish a signal between the parent gorou‐ tine and its children that allows the parent to signal cancel
concurrency/goroutine_leak/main.go:58
↓ 1 callers
Function
capitalizeLetters
(gQ chan string, sQ chan string)
concurrency/concurrency_in_go/ch1/letter_channel_example.go:20
↓ 1 callers
Function
checkFile
(file *File)
structural/composite/main.go:15
↓ 1 callers
Function
compress
(filename string)
concurrency/compressfiles/main.go:25
↓ 1 callers
Function
concurrentFetch
(urls []string)
concurrency/iterator/iterator_error_handling/main.go:28
↓ 1 callers
Function
crunch
(nums []int, a ...Cruncher)
functions/main.go:19
↓ 1 callers
Function
decodeBinaryValue
(b []byte)
playground/cbor/cbor_test.go:56
↓ 1 callers
Function
deferPointer
Remember that the passed params to a deferred func are saved aside immediately without waiting the deferred func to be run.
playground/defer/main.go:63
↓ 1 callers
Function
digester
digester reads path names from paths and sends digests of the corresponding files on c until either paths or done is closed.
concurrency/bounded/bounded_parallelism.go:51
↓ 1 callers
Function
doFirstThing
()
concurrency/select_error_handling/main.go:53
↓ 1 callers
Function
doSecondThing
()
concurrency/select_error_handling/main.go:60
↓ 1 callers
Function
dummyFetchUrl
(url string)
concurrency/iterator/iterator_error_handling/main.go:19
↓ 1 callers
Function
dummyProcess
(i int)
synchronization/simplesem/main.go:22
↓ 1 callers
Function
encodeBinaryValue
(b []byte)
playground/cbor/cbor_test.go:46
↓ 1 callers
Function
errorHandling
()
concurrency/error_handle/main.go:23
↓ 1 callers
Function
evaluateStatus
(statusChannel chan int, textChannel chan string, processChannel chan bool)
concurrency/concurrency_in_go/ch1/spider.go:52
↓ 1 callers
Function
fakeFetch
(domain string)
concurrency/feedreader/main.go:501
↓ 1 callers
Function
fanIn
fanIn compose different channels into one
messaging/fan/fan_in_out_test.go:52
↓ 1 callers
Function
fetch
(url string)
concurrency/fetch_urls/main.go:39
↓ 1 callers
Function
fetchAll
()
channel/basic_channel_error_handling/main.go:9
↓ 1 callers
Function
fib
(x int)
functions/fibonacci.go:25
↓ 1 callers
Function
fib
Generator func which produces data which might be computationally expensive.
concurrency/iterator/main.go:6
↓ 1 callers
Function
filterGopher
(upstream, downstream chan string)
playground/goroutine/pipeline_test.go:16
↓ 1 callers
Function
fixBlockOnAttemptingToWriteToChannel
The solution, just like for the receiving case, is to provide the producer goroutine with a channel informing it to exit
concurrency/confinement/lexical/main.go:98
← previous
next →
101–200 of 583, ranked by callers