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
↓ 37 callers
Method
Add
Add attaches tasks to the Runner. A task is a function that takes an int ID.
concurrency/runner/main.go:51
↓ 21 callers
Method
Close
()
concurrency/feedreader/main.go:35
↓ 17 callers
Method
After
()
messaging/fanout.go:70
↓ 15 callers
Method
Run
()
structural/bridge/main.go:9
↓ 10 callers
Method
Error
()
behavioral/registry/registry.go:14
↓ 9 callers
Method
Get
Get retreives an item identified by the passed id from the registry
behavioral/registry/registry.go:36
↓ 7 callers
Function
writeStdout
writeStdout is used to write a system message directly to stdout.
workerpool/ardan_labs_worker_pool/worker_pool.go:222
↓ 6 callers
Method
Fetch
()
concurrency/feedreader/main.go:24
↓ 6 callers
Method
NewCake
(flavour string)
structural/flyweight/main.go:16
↓ 6 callers
Function
ParseDuration
(str string)
playground/cron/iso8601parser.go:9
↓ 6 callers
Function
ParseInt64
(value string)
playground/cron/iso8601parser.go:26
↓ 5 callers
Method
Error
()
synchronization/waitgroup/error_handling.go:11
↓ 5 callers
Method
String
()
idiom/iota_const/main.go:17
↓ 5 callers
Method
Updates
()
concurrency/feedreader/main.go:34
↓ 4 callers
Method
AddChild
(file ...*File)
structural/composite/main.go:11
↓ 4 callers
Method
Fail
(f FailFunc)
messaging/future/future/main.go:21
↓ 4 callers
Function
NewTask
NewTask initializes a new task based on a given work function.
workerpool/main.go:24
↓ 4 callers
Method
Open
(string)
creational/factory_method.go:6
↓ 4 callers
Method
Start
(player string)
behavioral/chain_of_responsibility/main.go:12
↓ 4 callers
Function
f
()
shadow/main.go:5
↓ 4 callers
Method
interpret
(input string)
behavioral/interpreter/Interpreter.go:26
↓ 4 callers
Function
writeToFile
(fileName string, b []byte)
playground/cbor/cbor_test.go:97
↓ 3 callers
Function
Fetch
Fetch returns a Fetcher for Items from domain.
concurrency/feedreader/main.go:494
↓ 3 callers
Method
Log
(s string)
playground/zero_initialization/main.go:12
↓ 3 callers
Method
Push
(v interface{})
playground/generic_data_structure/main.go:14
↓ 3 callers
Method
Sell
()
structural/facade/main.go:14
↓ 3 callers
Function
Subscribe
STOPSUBSCRIPTION OMIT STARTSUBSCRIBE OMIT Subscribe returns a new Subscription that uses fetcher to fetch Items.
concurrency/feedreader/main.go:42
↓ 3 callers
Method
SubscribeTopic
添加一个新的订阅者,订阅过滤器筛选后的主题
messaging/pubsub/main.go:69
↓ 3 callers
Function
catchPanic
CatchPanic is used to catch any Panic and log exceptions to Stdout. It will also write the stack trace.
workerpool/ardan_labs_worker_pool/worker_pool.go:207
↓ 3 callers
Function
createTask
createTask returns an example task that sleeps for the specified number of seconds based on the id.
concurrency/runner/main.go:126
↓ 3 callers
Function
getImageBytes
(imgFile string, buf *bytes.Buffer)
playground/cbor/cbor_test.go:65
↓ 3 callers
Function
sq
The second stage, sq, receives integers from a channel and returns a channel that emits the square of each received integer. After the inbound channel
concurrency/pipeline/main.go:44
↓ 3 callers
Method
updateFav
(fav string)
behavioral/observerpattern/main.go:53
↓ 2 callers
Method
Accept
(Visitor)
behavioral/visitor/main.go:11
↓ 2 callers
Method
AddMemento
(memento PlayerMemento)
behavioral/memento/main.go:48
↓ 2 callers
Method
Bid
(price int)
behavioral/mediator/main.go:21
↓ 2 callers
Method
Construct
()
creational/builder/builder/main.go:32
↓ 2 callers
Method
Drive
(vi VehicleAbstraction)
structural/bridge/main.go:45
↓ 2 callers
Method
Execute
(f ExecuteStringFunc)
messaging/future/future/main.go:26
↓ 2 callers
Method
Go
(g Game)
behavioral/template/main.go:15
↓ 2 callers
Method
MaxSpeed
()
structural/bridge/main.go:10
↓ 2 callers
Method
MoveTo
(x,y int)
behavioral/memento/main.go:21
↓ 2 callers
Method
Name
()
concurrency/subtasks/divide_and_conquer/divide_and_conquer.go:61
↓ 2 callers
Function
New
New constructs a new Deadline with the given timeout.
stability/deadline/deadline.go:18
↓ 2 callers
Method
Notify
Notify publishes new events to listeners. The method is not absolutely necessary, as each implementation could define this itself without losing funct
behavioral/observer/main.go:38
↓ 2 callers
Method
Operate
(leftValue, rightValue int)
behavioral/strategy/main.go:12
↓ 2 callers
Function
Producer
(factor int, out chan<- int)
channel/producer_consumer/main.go:21
↓ 2 callers
Method
Publish
发布一个主题
messaging/pubsub/main.go:86
↓ 2 callers
Method
Register
(l Observer)
behavioral/observer/main.go:58
↓ 2 callers
Method
Release
()
synchronization/semaphore2/main.go:31
↓ 2 callers
Method
RemoveLast
()
behavioral/memento/main.go:52
↓ 2 callers
Method
Restore
(m PlayerMemento)
behavioral/memento/main.go:33
↓ 2 callers
Method
Save
()
behavioral/memento/main.go:26
↓ 2 callers
Method
SayHi
()
playground/mocklib/robot.go:7
↓ 2 callers
Method
SetBuilder
(b BuildProcess)
creational/builder/builder/main.go:36
↓ 2 callers
Method
SetSeats
()
creational/builder/builder/main.go:14
↓ 2 callers
Method
SetStructure
()
creational/builder/builder/main.go:15
↓ 2 callers
Method
SetWheels
()
creational/builder/builder/main.go:13
↓ 2 callers
Method
Speak
()
playground/benchmark/main.go:9
↓ 2 callers
Method
Start
(t GameType, player string)
behavioral/chain_of_responsibility/main.go:24
↓ 2 callers
Method
Success
(f SuccessFunc)
messaging/future/future/main.go:16
↓ 2 callers
Method
addAlbumToRegistry
(album Album)
behavioral/interpreter/Interpreter.go:21
↓ 2 callers
Function
assertEqual
(t *testing.T, a interface{}, b interface{})
stability/deadline/deadline_test.go:9
↓ 2 callers
Function
futureData
(url string)
messaging/future/main.go:14
↓ 2 callers
Function
gen
The first stage, gen, is a function that converts a list of integers to a channel that emits the integers in the list. The gen function starts a gorou
concurrency/pipeline/main.go:30
↓ 2 callers
Function
generator
(done <-chan interface{}, integers ...int)
concurrency/pipeline/pipeline_from_book/main.go:19
↓ 2 callers
Function
incCounter
(id int)
concurrency/atomic_functions/main.go:30
↓ 2 callers
Function
makeRobotsSayHi
makeRobotsSayHi is used for making robots say hi
playground/mocklib/robot.go:41
↓ 2 callers
Function
multiply
(done <-chan interface{}, intStream <-chan int, multiplier int)
concurrency/pipeline/pipeline_from_book/main.go:34
↓ 2 callers
Function
outputText
(j *Job)
concurrency/concurrency_in_go/main.go:17
↓ 2 callers
Function
outputText
(j *Job, goGroup *sync.WaitGroup)
concurrency/concurrency_in_go/ch1/ch1.go:15
↓ 2 callers
Function
player
(name string, table chan *Ball)
concurrency/pingpong/main.go:19
↓ 2 callers
Method
print
()
playground/interface-semantics/main.go:11
↓ 2 callers
Function
run
()
concurrency/pipeline/pipeline_from_book/main.go:9
↓ 2 callers
Function
say
(funcName string)
playground/factory/robot.go:7
↓ 2 callers
Function
sleepyGopherWithChan
(id int, c chan int)
playground/goroutine/basic_chan_test.go:20
↓ 2 callers
Function
sq
The second stage, sq, receives integers from a channel and returns a channel that emits the square of each received integer. After the inbound channel
messaging/fan_in_out/main.go:84
↓ 2 callers
Function
sq
(in <-chan int)
concurrency/pipeline/pipeline/main.go:32
↓ 2 callers
Function
squareNumber
(in <-chan int)
messaging/fan/fan_in_out_test.go:40
↓ 2 callers
Function
transaction
(amt int)
concurrency/race_detection/main.go:43
↓ 1 callers
Method
Acquire
Acquire retrieves a resource from the pool. This method returns a resource from the pool if one is available, or creates a new one for the call.
workerpool/pool/main.go:60
↓ 1 callers
Method
ActiveRoutines
ActiveRoutines will return the number of routines performing work.
workerpool/ardan_labs_worker_pool/worker_pool.go:202
↓ 1 callers
Method
AddGame
(games ...Game)
behavioral/chain_of_responsibility/main.go:20
↓ 1 callers
Method
AddOne
()
creational/singleton/singleton.go:4
↓ 1 callers
Method
Apply
(int, int)
behavioral/strategy/main.go:4
↓ 1 callers
Method
Aquire
()
synchronization/semaphore2/main.go:30
↓ 1 callers
Method
Attach
(observer AbstractObserver)
behavioral/observerpattern/main.go:34
↓ 1 callers
Method
Attack
()
behavioral/command/main.go:27
↓ 1 callers
Method
Await
error for timeout if need
concurrency/barrier/n_barrier/main.go:10
↓ 1 callers
Method
Before
(context.Context)
messaging/fanout.go:69
↓ 1 callers
Method
BuyAll
()
structural/facade/main.go:41
↓ 1 callers
Method
CallCommands
()
behavioral/command/main.go:46
↓ 1 callers
Method
Close
关闭发布者对象,同时关闭所有的订阅者管道。
messaging/pubsub/main.go:98
↓ 1 callers
Function
Consumer
(in <-chan int)
channel/producer_consumer/main.go:27
↓ 1 callers
Function
CreateVehicleFactory
(v int)
creational/abstract_factory/abstract_factory.go:13
↓ 1 callers
Method
Detach
(observer AbstractObserver)
behavioral/observerpattern/main.go:38
↓ 1 callers
Function
DivideAndConquer
(data interface{}, evaluators []Evaluator, timeout time.Duration)
concurrency/subtasks/divide_and_conquer/divide_and_conquer.go:73
↓ 1 callers
Method
DoWork
(workRoutine int)
workerpool/ardan_labs_worker_pool/worker_pool.go:121
↓ 1 callers
Function
Duration
(invocation time.Time, name string)
profiling/profile.go:9
↓ 1 callers
Method
Escape
()
behavioral/command/main.go:28
next →
1–100 of 583, ranked by callers