MCPcopy Create free account

hub / github.com/corsc/Beyond-Effective-Go / functions

Functions1,301 in github.com/corsc/Beyond-Effective-Go

MethodToken
()
Chapter04/02_design_patterns/04_adapter/02_embedding/example.go:19
MethodToken
()
Chapter04/02_design_patterns/04_adapter/02_embedding/example.go:26
MethodTransfer
(amount int, recipient string)
Chapter06/01_what_when_why_how/03_how_much/02_what_is_a_unit/account.go:9
MethodUnmarshalJSON
([]byte)
Chapter04/01_software_design_principles/01_minimalist_modular/01_json_interface.go:5
MethodUnmarshalJSON
(bytes []byte)
Chapter05/01_clarity/12_globals/02_enum/example.go:21
MethodUpdate
(*City)
Chapter04/01_software_design_principles/07_interface_segregation/01_fat_interface/example.go:9
MethodUpdate
(ctx context.Context, escalationID string, policy NewPolicy)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/escalations/escalations.go:89
MethodUpdate
(ctx context.Context, serviceID string, service NewService, team NewTeam)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/services/services.go:114
MethodUpdate
(ctx context.Context, scheduleID string, schedule ReqSchedule, defaultTimeZone string)
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/internal/schedules/schedules.go:118
FunctionUpdateCountryByIDV1
(ctx context.Context, countryID int)
Chapter01/03_concurrency_issues/04_detect_fix_avoid/03_reduce_lock_coverage/01_first.go:16
FunctionUpdateCountryByIDV2
(ctx context.Context, countryID int)
Chapter01/03_concurrency_issues/04_detect_fix_avoid/03_reduce_lock_coverage/02_second.go:7
FunctionUpdateDestinationV1
()
Chapter01/03_concurrency_issues/04_detect_fix_avoid/02_separate_logic/01_first.go:15
FunctionUpdateDestinationV2
()
Chapter01/03_concurrency_issues/04_detect_fix_avoid/02_separate_logic/02_second.go:3
MethodUpdateUserHandler
(http.Response, *http.Request)
Chapter04/01_software_design_principles/06_singles/01_purpose/01_user_management_endpoints.go:15
FunctionUsage
Confirm the relationship between the adapter and the new interface.
Chapter04/02_design_patterns/04_adapter/01_simple/example.go:35
FunctionUsage
()
Chapter04/02_design_patterns/04_adapter/03_go_types/example.go:8
FunctionUsage
(err error)
Chapter05/01_clarity/11_errors/03_wrapped_errors/01_custom_type/example.go:11
FunctionUsage
()
Chapter02/07_trouble/01_mutexes/mutexes.go:12
FunctionUsage
()
Chapter08/02_fun_with_functions/02_patterns/02_middleware/02_middleware/example.go:10
FunctionUsage
()
Chapter08/02_fun_with_functions/02_patterns/02_middleware/01_no_middleware/example.go:10
FunctionUseCopy
(mutex *sync.Mutex)
Chapter03/03_pprof/04_mutex_profiling/02_defer/main.go:28
MethodUsername
()
Chapter04/02_design_patterns/04_adapter/02_embedding/example.go:8
MethodUsername
()
Chapter04/02_design_patterns/04_adapter/02_embedding/example.go:17
FunctionValidateKeys
(validate bool)
Chapter08/02_fun_with_functions/02_patterns/03_functional_options/03_functional_options/example.go:53
MethodXXX_DiscardUnknown
()
Chapter03/05_patterns/05_data/fixed.pb.go:54
MethodXXX_Marshal
(b []byte, deterministic bool)
Chapter03/05_patterns/05_data/fixed.pb.go:45
MethodXXX_Merge
(src proto.Message)
Chapter03/05_patterns/05_data/fixed.pb.go:48
MethodXXX_Size
()
Chapter03/05_patterns/05_data/fixed.pb.go:51
MethodXXX_Unmarshal
(b []byte)
Chapter03/05_patterns/05_data/fixed.pb.go:42
FunctionaddPeriod
(in string)
Chapter08/01_functional_programming/02_higher_order/example.go:24
Functiondo
(o O)
Chapter05/01_clarity/01_bad_example/01_bad_example.go:7
Functionexamples
()
Chapter05/01_clarity/08_struct_init/example.go:7
FunctionextendedExample
(ctx context.Context)
Chapter02/03_select/02_read_from_nil/02_extended_example.go:8
FunctionextendedExampleFixed
(ctx context.Context)
Chapter02/03_select/02_read_from_nil/03_extended_example_fixed.go:8
FunctiongetCupSize
(milliliters int)
Chapter05/01_clarity/06_extended_switch/01_example.go:3
FunctiongetCupSizeImproved
(milliliters int)
Chapter05/01_clarity/06_extended_switch/01_example.go:15
FunctionhandlerWhitespace
(resp http.ResponseWriter, req *http.Request)
Chapter05/01_clarity/03_whitespace/02_handler_improved.go:9
FunctionhappyPathBankCharge
(bank *MockBank)
Chapter06/05_test_ux/03_reduce_duplication/02_mocks/example_test.go:132
FunctionhappyPathReceiptSend
(sender *MockReceiptSender)
Chapter06/05_test_ux/03_reduce_duplication/02_mocks/example_test.go:137
FunctionhistorySearch
(ctx context.Context, esClient *elastic.Client, termQuery *elastic.TermQuery)
Chapter06/07_patterns_tricks/05_fluent_api/02_second_iteration/example.go:60
Functioninit
()
fake.go:3
Functioninit
()
Chapter07/fake.go:3
Functioninit
()
Chapter06/07_patterns_tricks/11_skipping_tests/01_skip_with_init_test.go:20
Functioninit
()
Chapter03/05_patterns/05_data/fixed.pb.go:95
Functioninit
()
Chapter05/01_clarity/12_globals/01_magic/example.go:10
Functioninit
()
Chapter05/02_consistency/02_packages/02_naming/doc.go:3
Functioninit
()
Chapter05/02_consistency/02_packages/01_self_contained/01_traditional/dtos/transfer_request_dto.go:3
Functioninit
()
Chapter05/02_consistency/02_packages/01_self_contained/01_traditional/dtos/transfer_response_dto.go:3
Functioninit
()
Chapter05/02_consistency/02_packages/01_self_contained/01_traditional/validator/validator_api.go:3
Functioninit
()
Chapter05/02_consistency/02_packages/01_self_contained/01_traditional/validator/validatorimpl/transfer_impl.go:3
Functioninit
()
Chapter05/02_consistency/02_packages/01_self_contained/01_traditional/transfer/transfer_api.go:3
Functioninit
()
Chapter05/02_consistency/02_packages/01_self_contained/01_traditional/transfer/transferimpl/transfer_impl.go:3
FunctionisNotLast
(len int, index int, insert string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v7/generator.go:51
FunctionisNotLast
(len int, index int, insert string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v8/generator.go:54
Functionmain
()
Chapter03/03_pprof/03_blocking_profiling/03_channel_receive/main.go:14
Functionmain
()
Chapter03/03_pprof/03_blocking_profiling/02_channel_send/main.go:13
Functionmain
()
Chapter03/03_pprof/03_blocking_profiling/01_waitgroup/main.go:13
Functionmain
()
Chapter03/03_pprof/02_memory_profiling/01_cards/main.go:13
Functionmain
()
Chapter03/03_pprof/01_cpu_profiling/02_downloader/main.go:11
Functionmain
()
Chapter03/03_pprof/01_cpu_profiling/01_cards/main.go:13
Functionmain
()
Chapter03/03_pprof/04_mutex_profiling/01_mutex/main.go:17
Functionmain
()
Chapter05/01_clarity/13_panic/02_main/main.go:10
Functionmain
()
Chapter05/03_predictability/02_good_fences/mystore/cmd/main.go:3
Functionmain
()
Chapter01/01_concurrency_parallelism/01_intro/main.go:8
Functionmain
()
Chapter01/01_concurrency_parallelism/03_goroutine_cost/02/main.go:8
Functionmain
()
Chapter01/01_concurrency_parallelism/03_goroutine_cost/01/main.go:8
Functionmain
()
Chapter01/06_sync/06_cond/cond.go:12
Functionmain
()
Chapter01/03_concurrency_issues/01_deadlock/02_channels/channels.go:7
Functionmain
()
Chapter01/03_concurrency_issues/02_starvation/main.go:22
Functionmain
()
Chapter01/03_concurrency_issues/04_detect_fix_avoid/04_memory_for_lock_time/01_copy.go:15
Functionmain
()
Chapter01/03_concurrency_issues/04_detect_fix_avoid/01_communicate_dont_share/02_channel/channel.go:10
Functionmain
()
Chapter01/03_concurrency_issues/04_detect_fix_avoid/01_communicate_dont_share/01_mutex/mutex.go:18
Functionmain
()
Chapter09/01_api_integrations/examples_apps/pagerduty-gcal/main.go:30
Functionmain
()
Chapter09/01_api_integrations/examples_apps/pd-user-check/main.go:22
Functionmain
()
Chapter09/01_api_integrations/examples_apps/pagerduty-manager/cmd/main.go:18
Functionmain
()
Chapter09/01_api_integrations/01_example/02_configuration/main.go:7
Functionmain
()
Chapter09/02_call_apps/cmd/main.go:15
Functionmain
()
Chapter02/01_go_routines/03_clean_up/04_debug_leaks/main.go:9
Functionmain
()
Chapter02/01_go_routines/05_long_vs_lots/01_lots/main.go:16
Functionmain
()
Chapter02/01_go_routines/05_long_vs_lots/04_long/main.go:16
Functionmain
()
Chapter02/01_go_routines/05_long_vs_lots/03_long/main.go:16
Functionmain
()
Chapter02/01_go_routines/05_long_vs_lots/02_lots/main.go:16
Functionmain
()
Chapter02/06_execution_tracing/03_channel/main.go:10
Functionmain
()
Chapter02/06_execution_tracing/02_lots_vs_long/01_lots/main.go:18
Functionmain
()
Chapter02/06_execution_tracing/02_lots_vs_long/04_long/main.go:18
Functionmain
()
Chapter02/06_execution_tracing/02_lots_vs_long/03_long/main.go:18
Functionmain
()
Chapter02/06_execution_tracing/02_lots_vs_long/02_lots/main.go:18
Functionmain
()
Chapter02/06_execution_tracing/01_add_tracing/main.go:8
FunctionperformTask
()
Chapter05/01_clarity/07_shadowing/example.go:3
FunctionpngEncoder
()
Chapter08/02_fun_with_functions/02_patterns/01_abstract_methods/example_test.go:11
Functionreverse
(in string)
Chapter08/01_functional_programming/03_recursion/example.go:26
Functionspeak
(animal string)
Chapter05/01_clarity/03_whitespace/03_switch_bad.go:7
FunctionspeakWhitespace
(animal string)
Chapter05/01_clarity/03_whitespace/04_switch_improved.go:7
FunctionstubValue
(typeName string)
Chapter09/03_code_generation/02_stub_generator/03_generator_v8/generator.go:61
FunctiontoString
(people []Person)
Chapter03/04_benchmarking/05_extended/sample.go:15
FunctiontoStringV1
(people []Person)
Chapter03/04_benchmarking/05_extended/sample_test.go:56
FunctiontoUpper
(in string)
Chapter08/01_functional_programming/02_higher_order/example.go:20
FunctiontoUpper
(in string)
Chapter08/01_functional_programming/03_recursion/example.go:22
Methodupdater
(stopCh chan struct{})
Chapter02/05_patterns/06_update_oldest/update_oldest.go:14
FunctionvalidateItems
(items []item)
Chapter05/01_clarity/05_return_early/01_return_early.go:9
← previousnext →1,201–1,300 of 1,301, ranked by callers