{"id":21178838,"url":"https://github.com/luizottavioc/go-concepts","last_synced_at":"2026-05-04T16:37:43.723Z","repository":{"id":210927169,"uuid":"727417995","full_name":"luizottavioc/go-concepts","owner":"luizottavioc","description":"This repository houses a collection of Go projects and code snippets developed for educational purposes.","archived":false,"fork":false,"pushed_at":"2023-12-11T19:57:44.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T11:45:27.534Z","etag":null,"topics":["api","file-upload","go","gochannels","golang","goroutine","http","json","mongodb"],"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/luizottavioc.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}},"created_at":"2023-12-04T20:26:01.000Z","updated_at":"2024-07-16T13:04:19.000Z","dependencies_parsed_at":"2023-12-11T20:50:47.915Z","dependency_job_id":null,"html_url":"https://github.com/luizottavioc/go-concepts","commit_stats":null,"previous_names":["luizottavioc/go-concepts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizottavioc%2Fgo-concepts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizottavioc%2Fgo-concepts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizottavioc%2Fgo-concepts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizottavioc%2Fgo-concepts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luizottavioc","download_url":"https://codeload.github.com/luizottavioc/go-concepts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243629540,"owners_count":20322075,"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":["api","file-upload","go","gochannels","golang","goroutine","http","json","mongodb"],"created_at":"2024-11-20T17:26:53.023Z","updated_at":"2026-05-04T16:37:43.682Z","avatar_url":"https://github.com/luizottavioc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-concepts\nThis repository houses a collection of Go projects and code snippets that I've developed for educational purposes.\n\n## Services\n\u003ca href=\"./services/\"\u003eFolder\u003c/a\u003e with services that run complete flows.\n- \u003ca href=\"./services/auto-import-users/main.go\"\u003eauto-import-users\u003c/a\u003e: Service that reads, from time to time, an API that returns random users in a random quantity. After reading user data, it is incremented to a .json file in the ```./files``` folder. With this data saved in the file, after a specific number of increments in the file, it is read, deleted and saved in a MongoDB database (accessible through \u003ca href=\"./docker-compose.yaml\"\u003edocker-compose.yaml\u003c/a\u003e from the root). Reading and writing to the file is controlled using an auxiliary variable that blocks writing during reading so that deletion does not result in data loss.\n  \n## MongoDB\n\u003ca href=\"./mongodb/\"\u003eFolder\u003c/a\u003e with scripts for manipulating MongoDB. Is accessible by \u003ca href=\"./docker-compose.yaml\"\u003edocker-compose.yaml\u003c/a\u003e from the project root\n- \u003ca href=\"./mongodb/hello-world/main.go\"\u003ehello-world\u003c/a\u003e: Database connection test that creates a ```\"hello-world\"``` collection (if it does not exist), cleans the documents in this collection and adds a single ```{\"hello\":\"world\"}```.\n- \u003ca href=\"./mongodb/users/main.go\"\u003eusers\u003c/a\u003e: Script that adds users provided from an API every 3 records at each run.\n\n## Goroutines\n\u003ca href=\"./goroutines/\"\u003eFolder\u003c/a\u003e with files containing tests for using goroutines and communication channels.\n- \u003ca href=\"./goroutines/channels.go\"\u003echannels.go\u003c/a\u003e: Execution of two goroutines that share common channels. One goroutine prints numbers and another prints letters. They are executed together and only after the registration of the completion channels is the flow completed.\n- \u003ca href=\"./goroutines/routines.go\"\u003eroutines.go\u003c/a\u003e: Basic goroutine execution tests.\n\n## Http\n\u003ca href=\"./http/\"\u003eFolder\u003c/a\u003e with files for consuming external APIs via HTTP.\n  - \u003ca href=\"./http/random-data-api.go\"\u003erandom-data-api.go\u003c/a\u003e: Reads data from a random API, which can return data from a user, an address or a appliance.\n- \u003ca href=\"./http/cat-api.go\"\u003ecat-api.go\u003c/a\u003e: Consumption of an API that returns random cat species data.\n\n## OS\n\u003ca href=\"./os/\"\u003eFolder\u003c/a\u003e with scripts for file manipulation.\n- \u003ca href=\"./os/incrementing-json.go\"\u003eincrementing-json.go\u003c/a\u003e: Script that increments json results from a cat API into a common file.\n- \u003ca href=\"./os/incrementing-file.go\"\u003eincrementing-file.go\u003c/a\u003e: Script that increments lines in a text file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizottavioc%2Fgo-concepts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluizottavioc%2Fgo-concepts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizottavioc%2Fgo-concepts/lists"}