{"id":24321087,"url":"https://github.com/ishtiaqhimel/go-basic","last_synced_at":"2026-04-21T01:33:01.596Z","repository":{"id":176127766,"uuid":"570903458","full_name":"ishtiaqhimel/go-basic","owner":"ishtiaqhimel","description":"Learning the very basics of Go programming language (Golang)","archived":false,"fork":false,"pushed_at":"2025-05-03T17:07:40.000Z","size":240,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-25T13:01:24.684Z","etag":null,"topics":["go-basic","golang"],"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/ishtiaqhimel.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-26T14:04:49.000Z","updated_at":"2025-05-03T17:07:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"edc68992-a0e1-47d1-afb0-4db8fa4d7256","html_url":"https://github.com/ishtiaqhimel/go-basic","commit_stats":null,"previous_names":["ishtiaqhimel/go-basic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ishtiaqhimel/go-basic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-basic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-basic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-basic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-basic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ishtiaqhimel","download_url":"https://codeload.github.com/ishtiaqhimel/go-basic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-basic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32072967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go-basic","golang"],"created_at":"2025-01-17T16:31:13.233Z","updated_at":"2026-04-21T01:33:01.581Z","avatar_url":"https://github.com/ishtiaqhimel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Basic\n## What is Go?\nGo is expressive, concise, clean, and efficient. Go has gained popularity in recent years for the following reasons. Go was created at Google in 2007, and since then, engineering teams across the globe have adopted Go to build products and services at massive scale.\n- **Fast and Lightweight language** - Go is a language that manages memory with its built-in garbage collector. Hence it is fast and lightweight. It has a quick compilation time.\n- **Statically Typed Language** - The type of go variables are known at compile time.\n- **Clean and Concise Language** - The syntax of go is short and easier to understand.\n- **C like Language** - Go has adopted lots of features from the C programming language and is similar to C.\n\n## Why learn Go Programming?\n- **Cloud \u0026 Network Services** - With a strong ecosystem of tools and APIs on major cloud providers, it is easier than ever to build services with Go.\n\u003c/br\u003eGo has a strong ecosystem supporting service development. The standard library includes packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of security/encryption functionality, while the Go runtime includes tools for race detection, benchmarking/profiling, code generation, and static code analysis.\n\u003c/br\u003eThe major Cloud providers (GCP, AWS, Azure) have Go APIs for their services, and popular open source libraries provide support for API tooling (Swagger), transport (protocol buffers, gRPC), monitoring (OpenCensus), Object-Relational Mapping (gORM), and authentication (JWT). The open source community has also provided several service frameworks, including Go Kit, Go Micro, and Gizmo, which can be a great way to get started quickly.\n- **Command-line Interfaces (CLIs)** - With popular open source packages and a robust standard library, use Go to create fast and elegant CLIs.\n\u003c/br\u003eWhen developing CLIs in Go, two tools are widely used: Cobra \u0026 Viper.\n\u003c/br\u003eCobra is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and many more. With integrated command help, autocomplete and documentation, it makes documenting each command really simple.\n\u003c/br\u003eViper is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together.\n\u003c/br\u003eViper supports nested structures in the configuration, allowing CLI developers to manage the configuration for multiple parts of a large application. Viper also provides all of the tooling need to easily build twelve factor apps.\n- **Web Development** - With enhanced memory performance and support for several IDEs, Go powers fast and scalable web applications.\n\u003c/br\u003eGo is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from HTTP/2, to databases like MySQL, MongoDB and Elasticsearch, to the latest encryption standards including TLS 1.3. Go web applications run natively on Google App Engine and Google Cloud Run (for easy scaling) or on any environment, cloud, or operating system thanks to Go’s extreme portability.\n- **Development Operations \u0026 Site Reliability Engineering** - With fast build times, lean syntax, an automatic formatter and doc generator, Go is built to support both DevOps and SRE.\n\u003c/br\u003eGo serves both siblings, DevOps and SRE, from its fast build times and lean syntax to its security and reliability support. Go’s concurrency and networking features also make it ideal for tools that manage cloud deployment—readily supporting automation while scaling for speed and code maintainability as development infrastructure grows over time.\n\u003c/br\u003eDevOps/SRE teams write software ranging from small scripts, to command-line interfaces (CLI), to complex automation and services, and Go’s feature set has benefits for every situation.\n\n## How to run Go?\nThe simplest way of running Go code is by using an online Go compiler like [The Go Playground](https://go.dev/play/).\n\nYou can also easily install and run Go programming locally on your computer. For that, visit [Install Go on Windows, Linux, and macOS](https://go.dev/doc/install).\n\nFrom CLI we can run go program with `go run \u003cfile-name\u003e.go`. The `file-name` file must contain `main()` function from `main` package. If we have many file in same package, we must run `go run .`.\n\n## Hello World\nBasic Structure of a Go Program\nHere are the things to take away from this tutorial.\n\n1. All Go programs start from the main() function.\n2. The bare minimum code structure of a Go program is:\n```go\npackage main\n\nfun main() {\n    // code starts here\n}\n```\n\n## Learning Path for Go programming language (Golang)\n- Basics\n    - Basic Syntax\n    - Data Types\n    - Variables and declaration\n    - Conditionals (if, switch)\n    - For loop\n    - Array, slice, maps\n    - Functions (multiple/named returns, variadic, closure)\n    - Structs\n    - Type inference\n    - Type casting\n    - Package, imports and exports\n        - IO \n        - Template (text)\n    - Errors, Panic, Recover\n    - Testing\n- Concurrency\n    - Goroutines\n    - Types, Type Assertions, switches\n    - Interfaces\n    - Context\n    - Channel\n    - Buffer\n    - Select\n    - Mutex\n\n\n### *First Read*\n- [Language specification](https://go.dev/ref/spec)\n- [How To Write Go Code](https://go.dev/doc/code)\n\n### *Book*\n- [An Introduction to Programming in Go](https://www.golang-book.com/books/intro)\n\n### *Additional Resources/Blog links*\n- [A Tour of Go](https://go.dev/tour/welcome/1)\n- [GolangBot](https://golangbot.com/learn-golang-series/)\n- [GoByExample](https://gobyexample.com/)\n- [Closure Usage - calhoun](https://www.calhoun.io/5-useful-ways-to-use-closures-in-go/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishtiaqhimel%2Fgo-basic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishtiaqhimel%2Fgo-basic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishtiaqhimel%2Fgo-basic/lists"}