{"id":21076328,"url":"https://github.com/rapter1990/go_sample_examples","last_synced_at":"2025-08-23T18:15:45.544Z","repository":{"id":255572173,"uuid":"852430809","full_name":"Rapter1990/go_sample_examples","owner":"Rapter1990","description":"Go Sample Examples","archived":false,"fork":false,"pushed_at":"2024-09-22T19:31:07.000Z","size":366,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T16:53:32.267Z","etag":null,"topics":["documentation","example","examples","go","go-example-simple","go-examples","golang","readme","resource"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rapter1990.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-04T19:42:40.000Z","updated_at":"2025-04-02T13:24:09.000Z","dependencies_parsed_at":"2025-07-27T16:51:56.037Z","dependency_job_id":null,"html_url":"https://github.com/Rapter1990/go_sample_examples","commit_stats":null,"previous_names":["rapter1990/go_sample_examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rapter1990/go_sample_examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fgo_sample_examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fgo_sample_examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fgo_sample_examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fgo_sample_examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rapter1990","download_url":"https://codeload.github.com/Rapter1990/go_sample_examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fgo_sample_examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271760532,"owners_count":24816441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","example","examples","go","go-example-simple","go-examples","golang","readme","resource"],"created_at":"2024-11-19T19:27:51.752Z","updated_at":"2025-08-23T18:15:45.515Z","avatar_url":"https://github.com/Rapter1990.png","language":"Go","readme":"# Go Sample Examples\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/golang.png\" alt=\"Main Information\" width=\"600\" height=\"400\"\u003e\n\u003c/p\u003e\n\n### 📖 Information\n\n\u003cul style=\"list-style-type:disc\"\u003e\n  \u003cli\u003eThis project showcases sample Go applications demonstrating various functionalities, including data processing, web server management, and concurrent programming techniques.\u003c/li\u003e\n  \u003cli\u003eIt is designed to help developers understand Go's syntax, features, and best practices through practical examples.\u003c/li\u003e\n  \u003cli\u003eThe repository includes:\n    \u003cul\u003e\n      \u003cli\u003eExamples of basic Go data structures, functions, and interfaces.\u003c/li\u003e\n      \u003cli\u003eWeb server setup using Go's standard library for HTTP handling.\u003c/li\u003e\n      \u003cli\u003eConcurrency examples using goroutines, channels, and the Go scheduler.\u003c/li\u003e\n      \u003cli\u003eFile handling operations like reading from and writing to files.\u003c/li\u003e\n      \u003cli\u003eWorking with arrays, slices, and maps to demonstrate Go's powerful collection types.\u003c/li\u003e\n      \u003cli\u003eJSON encoding and decoding examples, including working with custom data structures.\u003c/li\u003e\n      \u003cli\u003eError handling following Go idioms to demonstrate best practices for robust programs.\u003c/li\u003e\n      \u003cli\u003eBasic data parsing, string manipulation, arithmetic operations, and JSON handling in Go.\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n\n### Explore Go Sample Examples\n\nExamples Summary\n\n\u003ctable\u003e\n  \u003ctr\u003e\n      \u003cth\u003eID\u003c/th\u003e\n      \u003cth\u003eExample\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eLink\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003eHello World\u003c/td\u003e\n      \u003ctd\u003eBasic example of printing \"Hello, World!\" to the console.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/001_hello_world\"\u003e001_hello_world\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n      \u003ctd\u003eVariables \u0026 Types\u003c/td\u003e\n      \u003ctd\u003eDemonstrates variable declaration, initialization, and types.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/002_variables\"\u003e002_variables\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e3\u003c/td\u003e\n      \u003ctd\u003eControl Flow\u003c/td\u003e\n      \u003ctd\u003eShows usage of for loops, while loops, if-else statements, and switch statements.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/003_for_while_if_else_switch\"\u003e003_for_while_if_else_switch\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e4\u003c/td\u003e\n      \u003ctd\u003eArray, Slice, Range, Map\u003c/td\u003e\n      \u003ctd\u003eDemonstrates array and slice operations, range iteration, and map manipulation.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/004_array_slice_range_map\"\u003e004_array_slice_range_map\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e5\u003c/td\u003e\n      \u003ctd\u003eFunctions\u003c/td\u003e\n      \u003ctd\u003eIllustrates basic function usage, variadic functions, closures, and recursion.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/005_function\"\u003e005_function\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e6\u003c/td\u003e\n      \u003ctd\u003ePointers\u003c/td\u003e\n      \u003ctd\u003eShows how to use pointers to modify values, structs, slices, and maps. Includes pointer-to-pointer operations.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/006_pointer\"\u003e006_pointer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e7\u003c/td\u003e\n      \u003ctd\u003eStrings \u0026 Runes\u003c/td\u003e\n      \u003ctd\u003eExplains how to manipulate strings and runes, including encoding, slicing, and comparing.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/007_strings_runes\"\u003e007_strings_runes\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e8\u003c/td\u003e\n      \u003ctd\u003eStructs\u003c/td\u003e\n      \u003ctd\u003eDemonstrates struct declaration, methods, embedded structs, JSON tags, and more.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/008_structs\"\u003e008_structs\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e9\u003c/td\u003e\n      \u003ctd\u003eInterfaces\u003c/td\u003e\n      \u003ctd\u003eCovers defining and implementing interfaces, type assertions, type switches, and using methods with multiple interfaces.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/009_interfaces\"\u003e009_interfaces\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e10\u003c/td\u003e\n      \u003ctd\u003eError Handling\u003c/td\u003e\n      \u003ctd\u003eShows basic error creation, custom error types, error wrapping, unwrapping, and checking for specific errors.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/010_error\"\u003e010_error\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e11\u003c/td\u003e\n      \u003ctd\u003eGoroutines \u0026 Channels\u003c/td\u003e\n      \u003ctd\u003eDemonstrates using Goroutines for concurrency, WaitGroups for synchronization, channels for communication, and mutex for safe access to shared data.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/011_goroutine_channel\"\u003e011_goroutine_channel\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003eBuffering\u003c/td\u003e\n      \u003ctd\u003eShows how to use buffered channels, select statements, and bytes.Buffer, along with a custom buffer implementation.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/012_buffering\"\u003e012_buffering\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e13\u003c/td\u003e\n      \u003ctd\u003eChannel Synchronization\u003c/td\u003e\n      \u003ctd\u003eDemonstrates different ways of using channels for synchronization, including WaitGroups, one-way channels, and fan-out/fan-in patterns.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/013_channel_synchronization\"\u003e013_channel_synchronization\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e14\u003c/td\u003e\n      \u003ctd\u003eChannel Directions\u003c/td\u003e\n      \u003ctd\u003eShows how to use directional channels (send-only and receive-only) in Go, with examples including ping-pong, pipelining, and buffered channels.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/014_channel_directions\"\u003e014_channel_directions\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e15\u003c/td\u003e\n      \u003ctd\u003eChannel Select\u003c/td\u003e\n      \u003ctd\u003eDemonstrates the use of select statement with multiple channels to handle concurrent events.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/015_channel_select\"\u003e015_channel_select\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e16\u003c/td\u003e\n      \u003ctd\u003eTimeouts\u003c/td\u003e\n      \u003ctd\u003eIllustrates how to use timeouts with Goroutines and channels to control the execution flow.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/016_timeouts\"\u003e016_timeouts\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003e17\u003c/td\u003e\n      \u003ctd\u003eChannel Non-Blocking\u003c/td\u003e\n      \u003ctd\u003eDemonstrates non-blocking operations on channels using the select statement.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/017_channel_non_blocking\"\u003e017_channel_non_blocking\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd rowspan=\"5\"\u003e18\u003c/td\u003e\n      \u003ctd\u003eBasic Channel Closing\u003c/td\u003e\n      \u003ctd\u003eShows how to close a channel and handle its closure properly.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/018_closing_channel/01_basic_channel_closing\"\u003e01_basic_channel_closing\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eDetecting Closed Channel\u003c/td\u003e\n      \u003ctd\u003eExplains how to detect if a channel has been closed and how to handle it.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/018_closing_channel/02_detecting_closed_channel\"\u003e02_detecting_closed_channel\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eClosing Channels in Multiple Goroutines\u003c/td\u003e\n      \u003ctd\u003eDemonstrates how to safely close channels when multiple Goroutines are involved.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/018_closing_channel/03_closing_channels_in_multiple_goroutines\"\u003e03_closing_channels_in_multiple_goroutines\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eSending a Signal with a Closed Channel\u003c/td\u003e\n      \u003ctd\u003eShows the behavior of sending signals through a closed channel and how to manage it.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/018_closing_channel/04_sending_a_signal_with_a_closed_channel\"\u003e04_sending_a_signal_with_a_closed_channel\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePanic When Closing an Already Closed Channel\u003c/td\u003e\n      \u003ctd\u003eExplains what happens when you attempt to close an already closed channel and how to handle it.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/018_closing_channel/05_panic_when_closing_an_already_closed_channel\"\u003e05_panic_when_closing_an_already_closed_channel\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd rowspan=\"3\"\u003e19\u003c/td\u003e\n      \u003ctd\u003eBasic Example with Range Over Channel\u003c/td\u003e\n      \u003ctd\u003eShows how to use the range keyword to iterate over values received from a channel.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/019_range_over_channel/001_basic_example_range_over_channel\"\u003e001_basic_example_range_over_channel\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eMultiple Goroutines Sending to a Channel\u003c/td\u003e\n      \u003ctd\u003eDemonstrates how multiple Goroutines can send data to a single channel and how to handle it.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/019_range_over_channel/002_multiple_goroutines_sending_to_a_channel\"\u003e002_multiple_goroutines_sending_to_a_channel\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eBuffered Channels with Range\u003c/td\u003e\n      \u003ctd\u003eShows how to use buffered channels in conjunction with range to manage concurrent operations.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/019_range_over_channel/003_buffered_channels_with_range\"\u003e003_buffered_channels_with_range\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd rowspan=\"5\"\u003e20\u003c/td\u003e\n      \u003ctd\u003eSimple Timer\u003c/td\u003e\n      \u003ctd\u003eDemonstrates how to create and use a basic timer in Go.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/020_timers/001_simple_timer\"\u003e001_simple_timer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eStop Timer\u003c/td\u003e\n      \u003ctd\u003eShows how to stop a timer before it triggers.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/020_timers/002_stop_timer\"\u003e002_stop_timer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eReset Timer\u003c/td\u003e\n      \u003ctd\u003eExplains how to reset a timer to its initial state.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/020_timers/003_reset_timer\"\u003e003_reset_timer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eUsing time.After\u003c/td\u003e\n      \u003ctd\u003eDemonstrates how to use the time.After function to create timers.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/020_timers/004_using_time_after\"\u003e004_using_time_after\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eTimer with Select\u003c/td\u003e\n      \u003ctd\u003eShows how to use timers with the select statement for time-based control flow.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/020_timers/005_timer_with_select\"\u003e005_timer_with_select\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd rowspan=\"5\"\u003e21\u003c/td\u003e\n      \u003ctd\u003eBasic Ticker\u003c/td\u003e\n      \u003ctd\u003eDemonstrates how to create and use a basic ticker in Go.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/021_tickers/01_basic_ticker\"\u003e01_basic_ticker\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eStop Ticker\u003c/td\u003e\n      \u003ctd\u003eShows how to stop a ticker before it triggers the next tick.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/021_tickers/02_stop_ticker\"\u003e02_stop_ticker\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eTicker with Select\u003c/td\u003e\n      \u003ctd\u003eIllustrates how to use the select statement with a ticker for time-based control flow.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/021_tickers/03_ticker_with_select\"\u003e03_ticker_with_select\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eReset Ticker\u003c/td\u003e\n      \u003ctd\u003eExplains how to reset a ticker to its initial state.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/021_tickers/04_reset_ticker\"\u003e04_reset_ticker\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eTicker with Limited Ticks\u003c/td\u003e\n      \u003ctd\u003eShows how to stop a ticker after a specific number of ticks.\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"/021_tickers/05_ticker_with_limited_ticks\"\u003e05_ticker_with_limited_ticks\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"5\"\u003e22\u003c/td\u003e\n    \u003ctd\u003eBasic Worker Pool\u003c/td\u003e\n    \u003ctd\u003eDemonstrates how to implement a simple worker pool in Go.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/022_worker_pools/001_basic_worker_pool\"\u003e001_basic_worker_pool\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eWorker Pool with Buffered Channels\u003c/td\u003e\n    \u003ctd\u003eShows how to implement a worker pool with buffered channels.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/022_worker_pools/002_worker_pool_with_buffered_channels\"\u003e002_worker_pool_with_buffered_channels\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eWorker Pool with Error Handling\u003c/td\u003e\n    \u003ctd\u003eIllustrates how to handle errors in a worker pool.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/022_worker_pools/003_worker_pool_with_error_handling\"\u003e003_worker_pool_with_error_handling\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDynamic Worker Pool\u003c/td\u003e\n    \u003ctd\u003eExplains how to create a dynamic worker pool that adjusts based on workload.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/022_worker_pools/004_dynamic_worker_pool\"\u003e004_dynamic_worker_pool\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRate-Limited Worker Pool\u003c/td\u003e\n    \u003ctd\u003eShows how to limit the rate at which jobs are processed in a worker pool.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/022_worker_pools/005_rate_limited_worker_pool\"\u003e005_rate_limited_worker_pool\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"4\"\u003e23\u003c/td\u003e\n    \u003ctd\u003eBasic WaitGroup\u003c/td\u003e\n    \u003ctd\u003eDemonstrates basic usage of `sync.WaitGroup` for synchronizing goroutines.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/023_waitgroup/001_basic_waitgroup\"\u003e001_basic_waitgroup\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eWaitGroup with Anonymous Functions\u003c/td\u003e\n    \u003ctd\u003eShows how to use `sync.WaitGroup` with anonymous functions in goroutines.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/023_waitgroup/002_waitGroup_with_anonymous_functions\"\u003e002_waitGroup_with_anonymous_functions\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eWaitGroup with Multiple Waits\u003c/td\u003e\n    \u003ctd\u003eIllustrates using `sync.WaitGroup` to manage multiple stages of goroutines.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/023_waitgroup/003_waitgroup_with_multiple_waits\"\u003e003_waitgroup_with_multiple_waits\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eWaitGroup with Error Handling\u003c/td\u003e\n    \u003ctd\u003eDemonstrates using `sync.WaitGroup` with error handling in workers.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/023_waitgroup/004_waitgroup_with_error_handling\"\u003e004_waitgroup_with_error_handling\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"5\"\u003e24\u003c/td\u003e\n    \u003ctd\u003eBasic Rate Limiter\u003c/td\u003e\n    \u003ctd\u003eDemonstrates a basic implementation of a rate limiter.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/024_rate_limiter/001_basic_rate_limiter\"\u003e001_basic_rate_limiter\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRate Limiter with Burst Capacity\u003c/td\u003e\n    \u003ctd\u003eShows how to implement rate limiting with burst capacity.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/024_rate_limiter/002_rate_limiter_burst_capacity\"\u003e002_rate_limiter_burst_capacity\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCustom Rate Limiter Using `time.After`\u003c/td\u003e\n    \u003ctd\u003eDemonstrates custom rate limiting using `time.After` for more flexibility.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/024_rate_limiter/003_custom_rate_limiter_using_time_after\"\u003e003_custom_rate_limiter_using_time_after\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRate Limiter with `context.Context`\u003c/td\u003e\n    \u003ctd\u003eShows how to implement rate limiting using `context.Context` for request cancellation and control.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/024_rate_limiter/004_rate_limiter_with_context\"\u003e004_rate_limiter_with_context\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRate Limiter with `time.NewTicker`\u003c/td\u003e\n    \u003ctd\u003eDemonstrates rate limiting using `time.NewTicker` for better control over the ticker's lifecycle.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/024_rate_limiter/005_rate_limiter_with_time_newticker\"\u003e005_rate_limiter_with_time_newticker\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"5\"\u003e25\u003c/td\u003e\n    \u003ctd\u003eBasic Atomic Counter Using `sync/atomic`\u003c/td\u003e\n    \u003ctd\u003eDemonstrates a simple atomic counter using the `sync/atomic` package.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/025_atomic_counters/001_basic_atomic_counter_using_sync_atomic\"\u003e001_basic_atomic_counter_using_sync_atomic\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eAtomic Counter with Decrement and Compare-And-Swap\u003c/td\u003e\n    \u003ctd\u003eShows an atomic counter with decrement and compare-and-swap operations.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/025_atomic_counters/002_atomic_counter_with_decrement_and_compare_and_swap\"\u003e002_atomic_counter_with_decrement_and_compare_and_swap\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eAtomic Flag Using `sync/atomic`\u003c/td\u003e\n    \u003ctd\u003eDemonstrates the use of an atomic flag for state management with `sync/atomic`.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/025_atomic_counters/003_atomic_flag_using_sync_atomic\"\u003e003_atomic_flag_using_sync_atomic\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eAtomic Counter with Load and Store Operations\u003c/td\u003e\n    \u003ctd\u003eShows how to use atomic load and store operations with counters.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/025_atomic_counters/004_atomic_counter_with_load_and_store_operations\"\u003e004_atomic_counter_with_load_and_store_operations\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eAtomic Pointer\u003c/td\u003e\n    \u003ctd\u003eDemonstrates how to atomically load and store a pointer value.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/025_atomic_counters/005_atomic_pointer\"\u003e005_atomic_pointer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"10\"\u003e26\u003c/td\u003e\n    \u003ctd\u003eBasic Sorting with Integers\u003c/td\u003e\n    \u003ctd\u003eDemonstrates basic sorting operations with integer slices.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/001_basic_sorting_with_integers\"\u003e001_basic_sorting_with_integers\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSorting Strings\u003c/td\u003e\n    \u003ctd\u003eShows how to sort slices of strings.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/002_sorting_strings\"\u003e002_sorting_strings\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSorting by Custom Slice\u003c/td\u003e\n    \u003ctd\u003eDemonstrates sorting a slice based on custom sorting logic.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/003_sorting_by_custom_slice\"\u003e003_sorting_by_custom_slice\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSorting by Multiple Fields\u003c/td\u003e\n    \u003ctd\u003eShows how to sort slices based on multiple fields.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/004_sorting_by_multiple_fields\"\u003e004_sorting_by_multiple_fields\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSorting a Custom Type Using `sort.Interface`\u003c/td\u003e\n    \u003ctd\u003eDemonstrates sorting a custom type by implementing the `sort.Interface`.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/005_sorting_a_custom_type_using_sort_interface\"\u003e005_sorting_a_custom_type_using_sort_interface\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eReverse Sorting\u003c/td\u003e\n    \u003ctd\u003eShows how to sort slices in reverse order.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/006_reverse_sorting\"\u003e006_reverse_sorting\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSorting with Custom Comparator Function\u003c/td\u003e\n    \u003ctd\u003eDemonstrates sorting with a custom comparator function.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/007_sorting_with_custom_comparator_function\"\u003e007_sorting_with_custom_comparator_function\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSorting a Map by Keys\u003c/td\u003e\n    \u003ctd\u003eShows how to sort a map by its keys.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/008_sorting_a_map_by_keys\"\u003e008_sorting_a_map_by_keys\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSorting a Map by Values\u003c/td\u003e\n    \u003ctd\u003eDemonstrates sorting a map by its values.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/009_sorting_a_map_by_values\"\u003e009_sorting_a_map_by_values\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eConcurrent Sorting with Goroutines\u003c/td\u003e\n    \u003ctd\u003eShows how to use goroutines to sort slices concurrently.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/026_sorting/010_concurrent_sorting_with_goroutines\"\u003e010_concurrent_sorting_with_goroutines\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"10\"\u003e27\u003c/td\u003e\n    \u003ctd\u003eBasic Example of Defer\u003c/td\u003e\n    \u003ctd\u003eDemonstrates the basic usage of the `defer` keyword in Go.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/001_basic_example_of_defer\"\u003e001_basic_example_of_defer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eMultiple Defer\u003c/td\u003e\n    \u003ctd\u003eShows how multiple `defer` statements work and their order of execution.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/002_multiple_defer\"\u003e002_multiple_defer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDefer with Function Call\u003c/td\u003e\n    \u003ctd\u003eDemonstrates using `defer` with function calls.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/003_defer_with_function_call\"\u003e003_defer_with_function_call\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBasic Example of Panic\u003c/td\u003e\n    \u003ctd\u003eShows a basic example of using the `panic` function in Go.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/004_basic_example_of_panic\"\u003e004_basic_example_of_panic\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ePanic with Recover\u003c/td\u003e\n    \u003ctd\u003eDemonstrates how to use `recover` to handle panics and prevent program crashes.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/005_panic_with_recover\"\u003e005_panic_with_recover\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ePanic with Defer\u003c/td\u003e\n    \u003ctd\u003eShows how `defer` can be used alongside `panic` for resource cleanup.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/006_panic_with_defer\"\u003e006_panic_with_defer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eChain Panic and Defer\u003c/td\u003e\n    \u003ctd\u003eDemonstrates chaining of `panic` and `defer` statements to understand their interactions.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/007_chain_panic_and_defer\"\u003e007_chain_panic_and_defer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDefer Log Functions Exit\u003c/td\u003e\n    \u003ctd\u003eShows how to use `defer` to log function exits and track function calls.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/008_defer_log_functions_exit\"\u003e008_defer_log_functions_exit\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eClosing Resources with Defer\u003c/td\u003e\n    \u003ctd\u003eDemonstrates how to use `defer` to ensure resources like files are closed properly.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/009_closing_resources_with_defer\"\u003e009_closing_resources_with_defer\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDefer with HTTPS Requests\u003c/td\u003e\n    \u003ctd\u003eShows how to use `defer` to handle HTTP response body cleanup after making requests.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/027_panic_and_defer/010_defer_with_https_requests\"\u003e010_defer_with_https_requests\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e28\u003c/td\u003e\n    \u003ctd\u003eString Manipulations\u003c/td\u003e\n    \u003ctd\u003eDemonstrates various string manipulation techniques in Go.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/028_string_manipulations/001_string_manipulations\"\u003e001_string_manipulations\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"6\"\u003e29\u003c/td\u003e\n    \u003ctd\u003eConditional Logic in Templates\u003c/td\u003e\n    \u003ctd\u003eDemonstrates using conditional logic inside Go templates.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/029_text_samples/001_conditional_logic_in_templates\"\u003e001_conditional_logic_in_templates\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eLoops in Templates\u003c/td\u003e\n    \u003ctd\u003eShows how to use loops to iterate over data in Go templates.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/029_text_samples/002_loops_in_templates\"\u003e002_loops_in_templates\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eTemplate Functions\u003c/td\u003e\n    \u003ctd\u003eDemonstrates using built-in and custom functions in Go templates.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/029_text_samples/003_template_functions\"\u003e003_template_functions\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eNested Templates\u003c/td\u003e\n    \u003ctd\u003eShows how to use nested templates for organizing reusable templates.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/029_text_samples/004_nested_templates\"\u003e004_nested_templates\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eTemplate with Data Formatting\u003c/td\u003e\n    \u003ctd\u003eDemonstrates formatting data within Go templates, such as dates and numbers.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/029_text_samples/005_template_with_data_formatting\"\u003e005_template_with_data_formatting\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eComplex Structs and Template Actions\u003c/td\u003e\n    \u003ctd\u003eShows how to handle deeply nested struct fields in Go templates using the `with` action.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/029_text_samples/006_complex_structs_and_template_actions\"\u003e006_complex_structs_and_template_actions\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd rowspan=\"10\"\u003e30\u003c/td\u003e\n    \u003ctd\u003eBasic JSON Encoding and Decoding\u003c/td\u003e\n    \u003ctd\u003eDemonstrates basic JSON encoding in Go.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/001_basic_encoding_json\"\u003e001_basic_encoding_json\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBasic JSON Decoding\u003c/td\u003e\n    \u003ctd\u003eShows how to decode JSON into Go structs.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/002_basic_decoding_json\"\u003e002_basic_decoding_json\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eHandling Nested JSON Structures\u003c/td\u003e\n    \u003ctd\u003eDemonstrates handling nested JSON structures in Go.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/003_handling_nested_json_structures\"\u003e003_handling_nested_json_structures\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eWorking with JSON Arrays\u003c/td\u003e\n    \u003ctd\u003eShows how to work with JSON arrays in Go.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/004_working_with_json_arrays\"\u003e004_working_with_json_arrays\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCustom JSON Field Names\u003c/td\u003e\n    \u003ctd\u003eDemonstrates how to use custom JSON field names in Go structs.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/005_custom_json_field_names\"\u003e005_custom_json_field_names\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eOmitting Empty Fields\u003c/td\u003e\n    \u003ctd\u003eShows how to omit empty fields from JSON encoding.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/006_omitting_empty_fields\"\u003e006_omitting_empty_fields\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCustom JSON Marshaling and Unmarshaling\u003c/td\u003e\n    \u003ctd\u003eDemonstrates custom marshaling and unmarshaling of JSON data.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/007_custom_json_marshaling_and_unmarshaling\"\u003e007_custom_json_marshaling_and_unmarshaling\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDecoding JSON into a Map\u003c/td\u003e\n    \u003ctd\u003eShows how to decode JSON into a map with string keys and interface values.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/008_decoding_json_into_a_map_string_interface\"\u003e008_decoding_json_into_a_map_string_interface\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDecoding JSON with Unknown Fields\u003c/td\u003e\n    \u003ctd\u003eDemonstrates how to decode JSON while capturing unknown fields into a map.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/009_decoding_json_with_unknown_fields\"\u003e009_decoding_json_with_unknown_fields\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eStreaming JSON Encoding\u003c/td\u003e\n    \u003ctd\u003eShows how to use streaming JSON encoding with indentation.\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/030_json/010_streaming_json_encoding\"\u003e010_streaming_json_encoding\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\n### Technologies\n\n---\n- Go 1.23.0\n\n\n### Prerequisites\n\nEnsure Go is installed on your system\n```\n    https://golang.org/dl/\n```\n\n\n### Contributors\n\n- [Sercan Noyan Germiyanoğlu](https://github.com/Rapter1990)\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapter1990%2Fgo_sample_examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapter1990%2Fgo_sample_examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapter1990%2Fgo_sample_examples/lists"}