{"id":17789526,"url":"https://github.com/benderscript/go-gems","last_synced_at":"2025-04-02T00:45:43.133Z","repository":{"id":156946997,"uuid":"238612189","full_name":"BenderScript/go-gems","owner":"BenderScript","description":"Go Programming Language Hidden Gems","archived":false,"fork":false,"pushed_at":"2020-08-08T20:58:41.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-10-24T03:39:06.711Z","etag":null,"topics":["closures","go","golang","interview","labels","programming","runes","slices","uintptr","unsafe","variadic"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenderScript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-02-06T05:06:04.000Z","updated_at":"2023-10-24T03:40:12.167Z","dependencies_parsed_at":null,"dependency_job_id":"28f2e1bb-8e5d-4754-b3fb-f30f96ff9a4f","html_url":"https://github.com/BenderScript/go-gems","commit_stats":null,"previous_names":["benderscript/go-gems"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2Fgo-gems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2Fgo-gems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2Fgo-gems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenderScript%2Fgo-gems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenderScript","download_url":"https://codeload.github.com/BenderScript/go-gems/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735363,"owners_count":20825224,"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","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":["closures","go","golang","interview","labels","programming","runes","slices","uintptr","unsafe","variadic"],"created_at":"2024-10-27T10:33:05.289Z","updated_at":"2025-04-02T00:45:43.112Z","avatar_url":"https://github.com/BenderScript.png","language":"Go","readme":"# Go Programming Gems and Classic Problems\n\nThe goal is to compile hidden gems and off-the-beaten path Go features and patterns. This is not meant to be a library or reference implementation.\n\n## Gems and Off-the-beaten Path\n\n * [closures](./closures)\n    \n    A dramatic example of Go Closures. A two-level closure pattern.\n\n * [composite_literals](./composite_literals)\n    \n    It is important to understand what **composite literals** mean in Go through some interesting use-cases\n\n * [for_with_label](./for_with_label)\n    \n    For loops can have break and continue statements with **labels**. This is a useful but less well-known feature.\n    \n  * [runes_bytes_loops](./runes_bytes_loops)\n  \n      A must-understand for serious programmers. Simple program demonstrating tricky [concepts](https://blog.golang.org/strings). Do you know that 'a' is a int32, str[0] is a uint8, the value of position 0 in a _range loop_ is a rune? \n      \n   * [slice_gotchas](./slice_gotchas)\n   \n   Do you know that this does not cause an out of bounds error?\n   \n ```go\n \tc := make([]int, 3)\n \tfmt.Println(c[len(c):len(c)])\n ```\n\n * [slice_tricks](./slice_tricks)\n \n   Implementation of simple functions that demonstrate interesting slice operations such as [**extending, expanding and inserting**](https://github.com/golang/go/wiki/SliceTricks) elements.\n   \n  * [strings_in_depth](./strings_in_depth)\n\n    Let's look under the hood and see how strings are represented in Go and print a string by walking the memory addresses, C-style.\n   \n  * [variadic_functions](./variadic_functions)\n  \n     Variadic functions in Go are certainly off-the-beaten path. One hidden gem is **interface{} variadic functions**\n     \n## Classic Problems \n\n * [binary_uint8_reversal](./binary_uint8_reversal)\n * [caesar_cipher](./caesar_cipher)\n * [eratosthenes](./eratosthenes)\n    \n    A Classic problem but I wanted to dig deeper into the number theory behind it. I suggest reading \n    [Why in Sieve of Erastothenes of 𝑁 number you need to check and cross out numbers up to 𝑁‾‾√? How it's proved?](https://math.stackexchange.com/questions/58799/why-in-sieve-of-erastothenes-of-n-number-you-need-to-check-and-cross-out-numbe)\n    \n * [go_routines_gotchas](./go_routines_gotchas)\n * [is_rotation](./is_rotation)\n * [longest_substring](./longest_substring)\n * [median_sorted_arrays](./median_sorted_arrays)\n * [one_away](./one_away)\n * [palindromes](./palindromes)\n * [permutations](./permutations)\n * [two_sum](./two_sum)\n * [unique_chars](./unique_chars)\n * [urlify](./urlify)\n\n \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenderscript%2Fgo-gems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenderscript%2Fgo-gems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenderscript%2Fgo-gems/lists"}