Directories ¶ Show internal Expand all Path Synopsis chapter_1 1_visibilty_modifiers 2_comment_styles command 3_making_the_most_of_comments_in_documentation chapter_10 125_setting_GOMAXPROCS_during_runtime command 126_where_is_the_output command 127_using_context_withcancel command 128_uising_context_withtimeout command 129_using_context_withdeadline command 130_sharing_data_via_context command 131_waitgroup_updating_shared_state command 132_waitgroup_updating_shared_state_unsafely command 133_mutex_to_guarantee_exclusivity_of_access command 134_signalling_channel_for_mutual_exclusion command 135_sizing_the_buffer_to_store_results command 136_unidirectional_channel_types command 137_unbuffered_channel_for_signalling command 138_signalling_by_closing_the_channel command 139_signalling_multiple_goroutines_by_closing_the_channel command 140_reading_from_a_closed_channel command 141_reading_from_a_channel_with_range command 142_reading_from_a_closed_channel_with_range command 143_monitoring_multiple_channels_with_select command chapter_11 144_example_test_with_subtests command 145_examples_with_ordered_and_unordered_output command 146_modify_code_to_obtain_a_cpu_profile command 147_realtime_profiling_during_program_execution command chapter_3 5_hello_world_in_go command 6_how_not_to_use_aliasing command 7_the_dot_import_prefix command 8_simple_package chapter_6 10_all_variable_declaration_styles command 11_discarding_with_the_blank_identifier command 12_loose_typing_of_number_constants command 13_managing_number_constants_manually command 14_managing_number_constants_with_iota command 15_rebasing_the_numbering_from_1 command 16_non-linear_constant_sequences command 17_values_used_in_place_of_named_constants command 18_global_and_function_scope command 19_local_scope_in_control_structure command 20_pass_by_value command 21_pass_by_reference command 22_obtaining_a_pointer_directly command chapter_7 23_floating_point_number_addition_problem command 24_string_cut_using_byte_slice command 25_identical_strings_with_different_lengths command 26_unicode_codepoint_with_utf-8-code command 27_safely_obtaining_length_of_a_string command 28_array_length_capacity_and_element_initialisation command 29_array_length_is_part_of_its_type_definition command 30_set_array_length_with_the_spread_operator command 31_named_custom_struct_type_and_anonymous_struct command 32_unnamed_field_properties command 33_get_and_set_struct_fields command 34_composition_and_struct_embedding command 35_alignment_and_impact_on_memory command 36_trying_to_use_a_nil_map command 37_creating_an_empty_map command 38_map_passed_by_value command 39_map_passed_by_reference command 40_working_with_maps command 41_unsafe_map_access command 42_safe_map_access command 43_creating_a_slice command 44_slice_not_behaving_as_a_reference_type command 45_safely_return_the_new_slice_to_caller command 46_slice_behaving_as_a_reference_type command 48_slices_of_slices command 49_using_append command 50_reslicing_to_remove_a_specified_element_from_a_slice command 51_using_copy_to_create_a_slice_with_new_backing_array command 52_new_slice_backing_array_with_additional_capacity command 53_send_and_receive_on_unbuffered_channel command 54_the_stringer_interface command 55_implementing_stringer_on_a_custom_struct_type command 56_simple_transposition_error command 57_type_safety_using_custom_types command 58_implementing_the_stringer_interface_on_a_custom_type command 59_type_conversion_examples command 60_this_wont_print_what_you_expect command 61_fmt_sprintf_to_the_rescue command 62_package_strconv_examples command 63_a_custom_booltoi_helper_function command chapter_8 64_using_goto_to_restart_function_execution command 65_simple_function_with_conditional_if_else_logic command 66_eliminating_the_else_statements command 67_short_form_if_statement command 68_simple_switch_with_default command 69_expressionless_switch_statement command 70_short_form_switch_with_multiple_match_tests command 71_fallthrough_to_execute_the_next_case command 72_infinite_loop_with_for command 73_three_component_loop_with_for command 74_while_equivalent_using_for command 75_do_while_equivalent_with_for command 76_for_each_performed_using_idiomatic_for_range command 77_using_break_to_exit_a_loop command 78_using_continue_to_advance_to_next_loop_iteration command 79_using_errors_is_to_handle_different_error_values command 80_a_custom_error_type command 81_error_wrapping_and_unwrapping command 82_basic_panic_and_recover command 83_embedding_log_logger_to_augment_its_features command chapter_9 108_type_assertion_provides_the_concrete_type command 109_invalid_type_assertion_code_compiles_but_will_panic command 110_safely_performing_the_type_assertion command 111_type_switch_with_default_case command 112_using_reflection_to_discover_type_of_variable command 113_using_reflection_to_determine_if_value_or_pointer command 114_using_reflection_to_work_with_a_struct command 115_performance_overhead_of_reflection command 116_adding_two_int64_integers command 117_adding_other_integer_types command 118_a_single_sumintany_implementation command 119_a_generic_implementation_of_sumany command 120_using_a_type_constraint_list command 121_creating_a_custom_constraint command 122_using_composition_with_constraints command 123_allow_any_type_with_underlying_type_int command 124_multiple_type_parameters command 84_passing_values_as_variadic_arguments command 85_anonymous_and_named_return_parameters command 86_bug_risk_or_not command 87_callback_style_functions command 88_closure_functions command 89_pointer_return_for_database_connection command 92_value_and_pointer_receivers command 99_100_sendnotification_function command Click to show internal directories. Click to hide internal directories.