Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/corsc/Beyond-Effective-Go
/ functions
Functions
1,301 in github.com/corsc/Beyond-Effective-Go
⨍
Functions
1,301
◇
Types & classes
506
↓ 1 callers
Method
Count
()
Chapter01/06_sync/04_mutex/01_deadlock/deadlock.go:25
↓ 1 callers
Method
Decorate
Decorate provides a mock function with given fields: receipt
Chapter06/04_mocks_stubs_recorders/01_mocks/mock_receipt_decorator_test.go:13
↓ 1 callers
Method
Dial
()
Chapter01/06_sync/03_once/once.go:13
↓ 1 callers
Method
Do
()
Chapter06/06_test_resilience/example.go:9
↓ 1 callers
Method
Do
(ctx context.Context, customerName string)
Chapter06/07_patterns_tricks/05_fluent_api/02_second_iteration/example.go:23
↓ 1 callers
Function
DoSomething
()
Chapter06/08_test_induced_damage/02_outputs/02_after/example.go:7
↓ 1 callers
Function
DoSomething
()
Chapter06/08_test_induced_damage/02_outputs/01_before/example.go:7
↓ 1 callers
Method
DoWork
(result chan int)
Chapter06/07_patterns_tricks/06_concurrent_code/02_switch_outputs/example_test.go:30
↓ 1 callers
Method
DoWork
()
Chapter06/07_patterns_tricks/06_concurrent_code/01_typical_mistake/example.go:23
↓ 1 callers
Method
Equals
(in *User)
Chapter04/01_software_design_principles/03_delegation/02_delegation/example_test.go:32
↓ 1 callers
Function
Example
()
Chapter01/06_sync/02_channel_wait_group/channel_waitgroup.go:3
↓ 1 callers
Function
Example
()
Chapter01/06_sync/01_waitgroup/waitgroup.go:7
↓ 1 callers
Function
Example
()
Chapter02/01_go_routines/01_anonymous_closures/01_data_race.go:8
↓ 1 callers
Function
ExampleV2
()
Chapter02/01_go_routines/01_anonymous_closures/02_data_race.go:8
↓ 1 callers
Function
ExampleV3
()
Chapter02/01_go_routines/01_anonymous_closures/03_data_race.go:8
↓ 1 callers
Function
FanInExample
(stopCh chan struct{}, inputChA, inputChB chan int, outputCh chan int)
Chapter01/02_concurrency_model/02_select_data_flow/fan_in.go:3
↓ 1 callers
Function
FanOutExample
(inputCh chan int, outputChA, outputChB chan int)
Chapter01/02_concurrency_model/02_select_data_flow/fan_out.go:3
↓ 1 callers
Function
FastExample
(buffer *bytes.Buffer, person Person)
Chapter03/01_when_to_optimize/functions.go:13
↓ 1 callers
Method
Follow
Subscribe/add to list of observers
Chapter04/02_design_patterns/03_observer/example.go:19
↓ 1 callers
Method
Generate
(filename, targetInterface string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v6/generator.go:11
↓ 1 callers
Method
Generate
(filename, targetInterface string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v5/generator.go:11
↓ 1 callers
Method
Generate
(filename, targetInterface string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v7/generator.go:11
↓ 1 callers
Method
Generate
(filename, targetInterface string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v1/generator.go:11
↓ 1 callers
Method
Generate
(filename, targetInterface string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v8/generator.go:12
↓ 1 callers
Method
Generate
(filename, targetInterface string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v4/generator.go:11
↓ 1 callers
Method
Generate
(filename, targetInterface string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v2/generator.go:11
↓ 1 callers
Method
Generate
(filename, targetInterface string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v3/generator.go:11
↓ 1 callers
Function
GenerateHash
(nano int64)
Chapter05/01_clarity/13_panic/03_logfatal/example_test.go:19
↓ 1 callers
Method
Get
(key string)
Chapter01/02_concurrency_model/03_csp_usability/01_cache_channels.go:24
↓ 1 callers
Method
Get
(ctx context.Context, policyID string)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/escalations/escalations.go:37
↓ 1 callers
Method
Get
(ctx context.Context, scheduleID string)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/schedules/schedules.go:42
↓ 1 callers
Method
GetByName
(ctx context.Context, name string)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/escalations/escalations.go:54
↓ 1 callers
Method
GetByName
(ctx context.Context, name string)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/services/services.go:54
↓ 1 callers
Method
GetByName
(ctx context.Context, name string)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/schedules/schedules.go:59
↓ 1 callers
Method
GetDescription
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/escalations/escalations.go:183
↓ 1 callers
Method
GetDescription
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/services/services.go:131
↓ 1 callers
Method
GetEmail
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/users/users.go:67
↓ 1 callers
Method
GetEscalationPolicyID
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/services/services.go:136
↓ 1 callers
Method
GetHostConfig
()
Chapter04/02_design_patterns/04_adapter/03_go_types/version2/config.go:9
↓ 1 callers
Method
GetID
()
Chapter04/01_software_design_principles/01_minimalist_modular/02_composability.go:16
↓ 1 callers
Method
GetMembers
(ctx context.Context, teamID string)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/teams/teams.go:78
↓ 1 callers
Method
GetName
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/users/users.go:66
↓ 1 callers
Method
GetName
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/services/services.go:130
↓ 1 callers
Method
GetResult
()
Chapter06/07_patterns_tricks/06_concurrent_code/01_typical_mistake/example.go:27
↓ 1 callers
Method
GetScheduleID
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/escalations/escalations.go:184
↓ 1 callers
Method
GetTeamID
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/escalations/escalations.go:185
↓ 1 callers
Method
GetTeamID
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/services/services.go:135
↓ 1 callers
Method
GetTeamName
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/escalations/escalations.go:182
↓ 1 callers
Method
GetTeamRole
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/teams/teams.go:142
↓ 1 callers
Method
GetTimeZone
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/users/users.go:68
↓ 1 callers
Method
GetUserID
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/teams/teams.go:141
↓ 1 callers
Method
GetUserRole
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/users/users.go:69
↓ 1 callers
Method
GetUsers
GetUsers will returns the mapping between PD user id and email
Chapter09/01_api_integrations/01_example/01_calling_the_api/calling_pagerduty.go:39
↓ 1 callers
Function
InternetIsAccessible
()
Chapter02/05_patterns/05_fastest_responder/fastest_responder.go:7
↓ 1 callers
Method
IsHungry
()
Chapter01/03_concurrency_issues/03_livelock/livelock.go:56
↓ 1 callers
Function
LegacyFunction
(logger OldLogger)
Chapter04/02_design_patterns/04_adapter/01_simple/example.go:11
↓ 1 callers
Function
Load
(filename string)
Chapter05/01_clarity/13_panic/02_main/internal/config/config.go:7
↓ 1 callers
Method
Load
(ID int)
Chapter04/01_software_design_principles/05_accept_interface_return_struct/05_implicit_interfaces/example.go:8
↓ 1 callers
Method
LoadAll
()
Chapter02/01_go_routines/02_unpredictable/02_with_sync/with_sync.go:31
↓ 1 callers
Method
LoadAll
()
Chapter02/01_go_routines/02_unpredictable/01_without_sync/without_sync.go:31
↓ 1 callers
Method
LoadByID
(int)
Chapter04/01_software_design_principles/07_interface_segregation/01_fat_interface/example.go:10
↓ 1 callers
Method
LoadByID
(int)
Chapter04/01_software_design_principles/07_interface_segregation/02_thin_interface/example.go:8
↓ 1 callers
Function
LoadByUsernamePassword
(username, password string)
Chapter05/03_predictability/03_encapsulation/01_leak_dependency/internal/storage/storage.go:7
↓ 1 callers
Function
Marshal
$ go test -run=Bench. -bench=. -benchmem -benchtime=10s ./Chapter03/05_patterns/06_allocations/ goos: darwin goarch: amd64 pkg: github.com/corsc/Beyon
Chapter03/05_patterns/06_allocations/example_test.go:17
↓ 1 callers
Function
MarshalFixed
(in []byte, user *User)
Chapter03/05_patterns/06_allocations/example_test.go:41
↓ 1 callers
Method
Match
(in []string)
Chapter08/04_struct_tricks/01_empty/02_map/02_double_loop/02_loop_map/example_test.go:14
↓ 1 callers
Method
Match
(in []string)
Chapter08/04_struct_tricks/01_empty/02_map/02_double_loop/01_double_loop/example_test.go:13
↓ 1 callers
Function
MultiplexingExample
(stopCh chan struct{}, inputChA, inputChB chan int, outputChC, outputChD chan int)
Chapter01/02_concurrency_model/02_select_data_flow/multiplexing.go:3
↓ 1 callers
Function
New
(cfg Config)
Chapter05/01_clarity/13_panic/02_main/internal/server/server.go:7
↓ 1 callers
Function
New
(cfg Config, logger *zap.Logger)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/manager.go:41
↓ 1 callers
Function
NewCacheUsingChannels
()
Chapter01/02_concurrency_model/03_csp_usability/01_cache_channels.go:3
↓ 1 callers
Function
NewDeck
NewDeck creates a deck of cards (NOTE: the cards are in predictable order)
Chapter03/03_pprof/02_memory_profiling/game/cards.go:30
↓ 1 callers
Function
NewDeck
NewDeck creates a deck of cards (NOTE: the cards are in predictable order)
Chapter03/03_pprof/01_cpu_profiling/game/cards.go:30
↓ 1 callers
Function
NewDocumentFormat
(format string)
Chapter04/02_design_patterns/02_factory_method/02_example/example.go:3
↓ 1 callers
Function
NewLoader
()
Chapter02/01_go_routines/02_unpredictable/02_with_sync/with_sync.go:11
↓ 1 callers
Function
NewLoader
()
Chapter02/01_go_routines/02_unpredictable/03_without_goroutine/without_goroutine.go:10
↓ 1 callers
Function
NewLoader
(dsn string)
Chapter02/01_go_routines/02_unpredictable/01_without_sync/without_sync.go:10
↓ 1 callers
Function
NewOrderManager
(bank Bank, sender ReceiptSender)
Chapter06/02_table_driven_tests/example.go:8
↓ 1 callers
Function
NewOrderManager
(bank Bank, sender ReceiptSender)
Chapter06/04_mocks_stubs_recorders/01_mocks/example.go:8
↓ 1 callers
Function
NewOrderManager
(bank Bank, sender ReceiptSender)
Chapter06/05_test_ux/01_predictability/example.go:8
↓ 1 callers
Function
NewOrderManager
(bank Bank, sender ReceiptSender)
Chapter06/05_test_ux/03_reduce_duplication/02_mocks/example.go:8
↓ 1 callers
Function
NewPartitionedMap
(partitions int)
Chapter01/04_data_races/02_partitioned_map/partitioned_map.go:8
↓ 1 callers
Function
NewSuperFan
()
Chapter04/02_design_patterns/03_observer/example.go:70
↓ 1 callers
Function
NewUserDAOInterface
()
Chapter04/01_software_design_principles/05_accept_interface_return_struct/05_implicit_interfaces/example.go:12
↓ 1 callers
Function
NewUserDAOStruct
()
Chapter04/01_software_design_principles/05_accept_interface_return_struct/05_implicit_interfaces/example.go:16
↓ 1 callers
Function
NewUsersAPI
(apiBaseURL string, apiKey string)
Chapter09/01_api_integrations/01_example/01_calling_the_api/calling_pagerduty.go:25
↓ 1 callers
Function
NewWorkers
(totalWorkers int)
Chapter02/05_patterns/03_reply_channel/03_reply_channel.go:7
↓ 1 callers
Method
OutputHeader
OutputHeader outputs the header of the result table
Chapter09/01_api_integrations/examples_apps/pd-user-check/internal/printer/printer.go:35
↓ 1 callers
Method
Pickup
()
Chapter01/03_concurrency_issues/01_deadlock/01_mutexes/mutexes.go:43
↓ 1 callers
Method
Pickup
()
Chapter01/03_concurrency_issues/03_livelock/livelock.go:82
↓ 1 callers
Method
Process
(ctx context.Context, order Order)
Chapter06/02_table_driven_tests/example.go:20
↓ 1 callers
Method
Process
(ctx context.Context, order Order)
Chapter06/04_mocks_stubs_recorders/01_mocks/example.go:20
↓ 1 callers
Method
Process
(ctx context.Context, order Order)
Chapter06/05_test_ux/01_predictability/example.go:20
↓ 1 callers
Method
Process
(ctx context.Context, order Order)
Chapter06/05_test_ux/03_reduce_duplication/02_mocks/example.go:20
↓ 1 callers
Method
Put
(value interface{})
Chapter01/05_sync_atomic/03_compare_and_swap/thread_safe_slice.go:14
↓ 1 callers
Method
PutDown
()
Chapter01/03_concurrency_issues/01_deadlock/01_mutexes/mutexes.go:47
↓ 1 callers
Method
RemoveListener
(in chan int64)
Chapter02/05_patterns/04_event_listener/event_listener.go:22
↓ 1 callers
Method
Save
Save provides a mock function with given fields: _a0
Chapter04/01_software_design_principles/05_accept_interface_return_struct/04_testability_improved/mock_user_repository_test.go:16
↓ 1 callers
Method
Save
(user *user.User)
Chapter04/01_software_design_principles/05_accept_interface_return_struct/04_testability_improved/example.go:18
↓ 1 callers
Method
Save
(user *user.User)
Chapter04/01_software_design_principles/05_accept_interface_return_struct/03_testability/internal/repo/user_dao.go:14
← previous
next →
201–300 of 1,301, ranked by callers