golang-learn

module
v0.0.0-...-e8370c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT

README

go-learn

Build Status | codecov | Go Report Card | GoDoc

Documentation

If you have something to add, please let me know joaosoft@gmail.com

Introduction

This project started from the need to learn go language. This will cover almost everithing with simple examples.

Follow me at

Facebook: https://www.facebook.com/joaosoft

LinkedIn: https://www.linkedin.com/in/jo%C3%A3o-ribeiro-b2775438/

Content

  • 1_hello_world
  • 2_arguments
  • 3_variables
  • 4_loops
  • 5_strings
  • 6_scanner
  • 7_files
  • 8_fetch_http
  • 9_switch
  • 10_defer
  • 11_structs
  • 12_arrays
  • 13_slices
  • 14_maps
  • 15_funcs
  • 16_closures
  • 17_methods
  • 18_interfaces
  • 19_toString
  • 20_errors
  • 21_leitores
  • 22_go_routines
  • 23_channels
  • 24_select
  • 25_timeouts
  • 26_non_blocking_channel_operations
  • 27_heritage
  • 28_tests
  • 29_json
  • 30_flag
  • 31_web
  • 32_tree
  • 33_pipeline
  • 34_directory
  • 35_cancellation
  • 36_package
  • 37_reflection
  • 38_image
  • 39_objects
  • 40_command_line
  • 41_sort
  • 42_random
  • 43_regex
  • 44_pointers
  • 45_cache
  • 46_workers
  • 47_time
  • 48_queue_map
  • 49_queue_struct
  • 50_queue_controller
  • 51_elastic_search
  • 52_nsq
  • 53_viper
  • 54_recursion
  • 55_pointers
  • 56_tcp
  • 57_mutex
  • 58_database
    • postgres (TODO)
    • cassandra
  • 59_null
  • 60_gRPC
  • 61_template
  • 62_swagger (unfinished)
  • 63_leftpad
  • 64_manager (in development, application framework with support to process management, configuration, nsq consumer and producer, sql connections, rest servers, gateways, elastic search client) ######More information here
  • 65_signal
  • 66_goto
  • 67_reflection
  • 68_validation
  • 69_options
  • 70_patterns
  • 70_builder_pattern
  • 1_factory_pattern
  • 2_singleton_pattern
  • 3_decorator_pattern
  • 4_proxy_pattern
  • 5_observer_pattern
  • 6_strategy_pattern
  • 7_publisher_subscribe_pattern
  • 8_waitgroup
  • 9_state_handle_pattern
  • 71_waitgroup
  • 72_interesting
  • 73_go_convey
  • 74_imperative_vs_functional
  • 75_linked_list

Directories

Path Synopsis
0_exercises
1
3
When using channels as function parameters, you can specify if a channel is meant to only send or receive values.
When using channels as function parameters, you can specify if a channel is meant to only send or receive values.
Go’s select lets you wait on multiple channel operations.
Go’s select lets you wait on multiple channel operations.
Timeouts are important for programs that connect to external resources or that otherwise need to bound execution time.
Timeouts are important for programs that connect to external resources or that otherwise need to bound execution time.
28_tests
42_random
*
46_workers
48_queue
Go supports recursive functions.
Go supports recursive functions.
Go supports recursive functions.
Go supports recursive functions.
58_database
60_grpc
example_1/proto
Package main is a generated protocol buffer package.
Package main is a generated protocol buffer package.
example_2/proto
Package helloworld is a generated protocol buffer package.
Package helloworld is a generated protocol buffer package.
example_3/proto
Package grpc_sample is a generated protocol buffer package.
Package grpc_sample is a generated protocol buffer package.
example_4
Package service is a generated protocol buffer package.
Package service is a generated protocol buffer package.
61_template
62_swagger
example_1/swagger
@APIVersion 1.0.0 @APITitle Users Service @APIDescription Users Service @Contact joaosoft@gmail.com @TermsOfServiceUrl @License BSD @LicenseUrl http://opensource.org/licenses/BSD-2-Clause
@APIVersion 1.0.0 @APITitle Users Service @APIDescription Users Service @Contact joaosoft@gmail.com @TermsOfServiceUrl @License BSD @LicenseUrl http://opensource.org/licenses/BSD-2-Clause
64_go_news
67_reflection
70_patterns
6_observer_pattern/example_1
Package main serves as an example application that makes use of the observer pattern.
Package main serves as an example application that makes use of the observer pattern.
7_strategy_pattern/example_1
Package main serves as an example application that makes use of the observer pattern.
Package main serves as an example application that makes use of the observer pattern.
71_waitgroup
74_imperative_vs_functional
78_master_go_programing
1_go_basics/12_names_types_and_aliases
/////////////////////////////// Alias Declarations Go Playground: https://play.golang.org/p/bYzfoWGFWdd ///////////////////////////////
/////////////////////////////// Alias Declarations Go Playground: https://play.golang.org/p/bYzfoWGFWdd ///////////////////////////////
1_go_basics/13_coding_challenges/1_variables/3
There are some errors in the following Go program.
There are some errors in the following Go program.
1_go_basics/13_coding_challenges/1_variables/4
There are some errors in the following Go program.
There are some errors in the following Go program.
1_go_basics/13_coding_challenges/2_constants/4
There are some errors in the following Go program.
There are some errors in the following Go program.
1_go_basics/13_coding_challenges/2_constants/5
There are some errors in the following Go program.
There are some errors in the following Go program.
1_go_basics/13_coding_challenges/3_package_fmt/2
Consider the following constant declaration: const x float64 = 1.422349587101
Consider the following constant declaration: const x float64 = 1.422349587101
package main
Consider the following declarations:
package main
1_go_basics/13_coding_challenges/4_operators_and_conversions/4
Create a Go program that computes how long does it take for the Sunlight to reach the Earth if we know that the distance from the Sun to Earth is 149.6 million km and the speed of light is 299,792,458 m / s
Create a Go program that computes how long does it take for the Sunlight to reach the Earth if we know that the distance from the Sun to Earth is 149.6 million km and the speed of light is 299,792,458 m / s
1_go_basics/13_coding_challenges/4_operators_and_conversions/5
Write the correct logical operator (&&, || , !) inside the expression so that result1 will be false and result2 will be true.
Write the correct logical operator (&&, || , !) inside the expression so that result1 will be false and result2 will be true.
1_go_basics/13_coding_challenges/5_named_types_and_aliases/2
There are some errors in the following Go program.
There are some errors in the following Go program.
1.
1_go_basics/2_main
a package clause starts every source file main is a special name declaring an executable rather than a library (package)
a package clause starts every source file main is a special name declaring an executable rather than a library (package)
2_program_flow_control/7_coding_challenges/1_for_and_if_statements/2
Change the code from the previous exercise and use the continue statement to print out all the numbers divisible by 7 between 1 and 50.
Change the code from the previous exercise and use the continue statement to print out all the numbers divisible by 7 between 1 and 50.
2_program_flow_control/7_coding_challenges/1_for_and_if_statements/3
Change the code from the previous exercise and use the break statement to print out only the first 3 numbers divisible by 7 between 1 and 50.
Change the code from the previous exercise and use the break statement to print out only the first 3 numbers divisible by 7 between 1 and 50.
2_program_flow_control/7_coding_challenges/1_for_and_if_statements/4
Using a for loop, an if statement and the logical and operator print out all the numbers between 1 and 500 that divisible both by 7 and 5.
Using a for loop, an if statement and the logical and operator print out all the numbers between 1 and 500 that divisible both by 7 and 5.
2_program_flow_control/7_coding_challenges/1_for_and_if_statements/5
Using a for loop print out all the years from your birthday to current year.
Using a for loop print out all the years from your birthday to current year.
Consider the following Go
3_arrays/3_coding_challenges/2
Consider the following array declaration: nums := []int{30, -1, -6, 90, -6} Write a Go program that counts the number of positive even numbers in the array.
Consider the following array declaration: nums := []int{30, -1, -6, 90, -6} Write a Go program that counts the number of positive even numbers in the array.
3_arrays/3_coding_challenges/3
There are some errors in the following Go program.
There are some errors in the following Go program.
81_generics
You can edit this code! Click here and start typing.
You can edit this code! Click here and start typing.
You can edit this code! Click here and start typing.
You can edit this code! Click here and start typing.
84_context

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL