{"id":18305114,"url":"https://github.com/openapphub/golang-basic-demos","last_synced_at":"2025-04-09T10:41:46.641Z","repository":{"id":260196458,"uuid":"878357702","full_name":"openapphub/golang-basic-demos","owner":"openapphub","description":"Golang Basic Demos","archived":false,"fork":false,"pushed_at":"2024-10-30T09:52:17.000Z","size":10501,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T04:43:56.586Z","etag":null,"topics":["golang-basic-demos","hello-world"],"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/openapphub.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":"2024-10-25T08:40:02.000Z","updated_at":"2024-10-30T09:52:21.000Z","dependencies_parsed_at":"2024-10-30T04:19:12.949Z","dependency_job_id":null,"html_url":"https://github.com/openapphub/golang-basic-demos","commit_stats":null,"previous_names":["openapphub/golang-basic-demos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapphub%2Fgolang-basic-demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapphub%2Fgolang-basic-demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapphub%2Fgolang-basic-demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapphub%2Fgolang-basic-demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openapphub","download_url":"https://codeload.github.com/openapphub/golang-basic-demos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248023735,"owners_count":21035119,"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":["golang-basic-demos","hello-world"],"created_at":"2024-11-05T15:32:43.686Z","updated_at":"2025-04-09T10:41:46.625Z","avatar_url":"https://github.com/openapphub.png","language":"Go","readme":"# Golang Basic Demos\n\nThis repository contains multiple basic Golang example programs suitable for beginners to learn and practice. Each example covers different aspects of Golang, from a simple \"Hello World\" to concurrent programming and web servers. Through these examples, you can gradually master the core concepts and syntax of Golang.\n\n## Table of Contents\n\n1. [Hello World](#hello-world)\n2. [FizzBuzz](#fizzbuzz)\n3. [Number Guessing Game](#number-guessing-game)\n4. [Fibonacci Sequence](#fibonacci-sequence)\n5. [Concurrent Calculation](#concurrent-calculation)\n6. [Web Server](#web-server)\n7. [JSON Handling](#json-handling)\n8. [File I/O](#file-io)\n\n## Example Descriptions\n\n### Hello World\nThe most basic introductory program, outputting \"Hello, World!\".\n\n### FizzBuzz\nA classic programming exercise, printing numbers from 1 to 100. For multiples of 3, print \"Fizz\"; for multiples of 5, print \"Buzz\"; for numbers that are multiples of both 3 and 5, print \"FizzBuzz\".\n\n### Number Guessing Game\nA simple number guessing game where the program randomly generates a number between 1 and 100. The user inputs guesses, and the program hints whether the guess is too high or too low until the correct number is guessed.\n\n### Fibonacci Sequence\nGenerates the first N terms of the Fibonacci sequence.\n\n### Concurrent Calculation\nUses Goroutines and Channels for concurrent calculation, such as summing numbers from 1 to 100.\n\n### Web Server\nCreates a simple HTTP server that returns \"Hello, World!\".\n\n### JSON Handling\nReads JSON data and parses it into a struct.\n\n### File I/O\nReads the content of a file and writes it to another file.\n\n## How to Run\n\n1. Clone the repository to your local machine:\n   ```bash\n   git clone https://github.com/openapphub/golang-basic-demos.git\n   Navigate to the repository directory:\n    ```\n2. Navigate to the repository directory:\n    ```\n    cd golang-basic-demos\n    ```\n\n3. Navigate to the respective example directory, for example hello-world:\n    ```\n    cd hello-world\n    ```\n\n4. Run the example program:\n    ```\n    go run main.go\n    ```\n\n## Contributing\nFeel free to submit issues and improvement suggestions! If you have new example programs or ideas to improve existing ones, please submit a Pull Request.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapphub%2Fgolang-basic-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenapphub%2Fgolang-basic-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapphub%2Fgolang-basic-demos/lists"}