diff --git a/public/pdfs/roadmaps/golang.pdf b/public/pdfs/roadmaps/golang.pdf index 9dcb35556..3d766c18d 100644 Binary files a/public/pdfs/roadmaps/golang.pdf and b/public/pdfs/roadmaps/golang.pdf differ diff --git a/public/roadmaps/golang.png b/public/roadmaps/golang.png index cd43c51c8..7489134ed 100644 Binary files a/public/roadmaps/golang.png and b/public/roadmaps/golang.png differ diff --git a/src/data/roadmaps/golang/content/advanced-topics@expert-level.md b/src/data/roadmaps/golang/content/advanced-topics@expert-level.md new file mode 100644 index 000000000..bf027f3ce --- /dev/null +++ b/src/data/roadmaps/golang/content/advanced-topics@expert-level.md @@ -0,0 +1,3 @@ +# Advanced Topics + +Advanced Go topics include memory management, escape analysis, reflection, unsafe operations, CGO, and performance optimization. These sophisticated features enable building high-performance systems and solving specialized problems requiring deep language knowledge. While not needed for typical development, mastering these topics helps leverage Go's full capabilities. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/anonymous-functions@cEQ9NQX7ZkKLwz_hg9L_7.md b/src/data/roadmaps/golang/content/anonymous-functions@cEQ9NQX7ZkKLwz_hg9L_7.md index df7c2cbd4..7e59ff71b 100644 --- a/src/data/roadmaps/golang/content/anonymous-functions@cEQ9NQX7ZkKLwz_hg9L_7.md +++ b/src/data/roadmaps/golang/content/anonymous-functions@cEQ9NQX7ZkKLwz_hg9L_7.md @@ -1 +1,3 @@ -# Anonymous Functions \ No newline at end of file +# Anonymous Functions + +Anonymous functions in Go are functions declared without a name, also known as function literals or lambda functions. They can be assigned to variables, passed as arguments to other functions, or executed immediately. Anonymous functions are useful for short-lived operations, callback implementations, goroutine creation, and situations where defining a named function would be overkill. They have access to variables in their enclosing scope, making them effective for creating closures. Common use cases include event handlers, sorting custom comparisons, and implementing functional programming patterns. Anonymous functions help keep code concise and localized when full function definitions aren't necessary. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/array-to-slice-conversion@s1E4PQVVSlBeyNn7xBikW.md b/src/data/roadmaps/golang/content/array-to-slice-conversion@s1E4PQVVSlBeyNn7xBikW.md index b5c5f3a71..1d705ac7d 100644 --- a/src/data/roadmaps/golang/content/array-to-slice-conversion@s1E4PQVVSlBeyNn7xBikW.md +++ b/src/data/roadmaps/golang/content/array-to-slice-conversion@s1E4PQVVSlBeyNn7xBikW.md @@ -1 +1,3 @@ -# Array to Slice Conversion \ No newline at end of file +# Array to Slice Conversion + +Convert arrays to slices using expressions like `array[:]` or `array[start:end]`. Creates slice header pointing to array memory - no data copying. Modifications through slice affect original array. Efficient way to use arrays with slice-based APIs. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/arrays@Eu8JV-_W-P_bCx_PglIW0.md b/src/data/roadmaps/golang/content/arrays@Eu8JV-_W-P_bCx_PglIW0.md index 6bfa7b9a1..dbcc86a75 100644 --- a/src/data/roadmaps/golang/content/arrays@Eu8JV-_W-P_bCx_PglIW0.md +++ b/src/data/roadmaps/golang/content/arrays@Eu8JV-_W-P_bCx_PglIW0.md @@ -1 +1,3 @@ -# Arrays \ No newline at end of file +# Arrays + +Arrays in Go are fixed-size sequences of elements of the same type. The size of an array is part of its type, meaning arrays of different sizes are considered different types. Arrays are declared with a specific length and all elements are initialized to the zero value of the element type. While arrays have their uses, slices are more commonly used in Go because of their flexibility. Arrays are value types, meaning they are copied when assigned or passed to functions. Understanding arrays is important for grasping Go's type system and the foundation for slices. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/beego@p7yeYkbQKAjr2aA_eUno4.md b/src/data/roadmaps/golang/content/beego@p7yeYkbQKAjr2aA_eUno4.md index 97ae7c0f0..e6e63a410 100644 --- a/src/data/roadmaps/golang/content/beego@p7yeYkbQKAjr2aA_eUno4.md +++ b/src/data/roadmaps/golang/content/beego@p7yeYkbQKAjr2aA_eUno4.md @@ -1 +1,3 @@ -# beego \ No newline at end of file +# beego + +Beego is a full-stack web framework providing MVC architecture, ORM, session management, caching, and admin interface generation. Follows convention over configuration with extensive tooling for rapid development of enterprise applications requiring comprehensive features. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/benchmarks@t9xOuLBrAzEvv2-bOU2hF.md b/src/data/roadmaps/golang/content/benchmarks@t9xOuLBrAzEvv2-bOU2hF.md index 73c2c041c..31a810752 100644 --- a/src/data/roadmaps/golang/content/benchmarks@t9xOuLBrAzEvv2-bOU2hF.md +++ b/src/data/roadmaps/golang/content/benchmarks@t9xOuLBrAzEvv2-bOU2hF.md @@ -1 +1,3 @@ -# Benchmarks \ No newline at end of file +# Benchmarks + +Benchmarks measure code performance by timing repeated executions. Functions start with `Benchmark` and use `*testing.B` parameter. Run with `go test -bench=.` to identify bottlenecks, compare implementations, and track performance changes over time. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/boolean@PRTou83_rD0u7p2elGG4s.md b/src/data/roadmaps/golang/content/boolean@PRTou83_rD0u7p2elGG4s.md index 522544a96..4c5f144ac 100644 --- a/src/data/roadmaps/golang/content/boolean@PRTou83_rD0u7p2elGG4s.md +++ b/src/data/roadmaps/golang/content/boolean@PRTou83_rD0u7p2elGG4s.md @@ -1 +1,3 @@ -# Boolean \ No newline at end of file +# Boolean + +The `bool` type represents `true` or `false` values with default zero value of `false`. Essential for conditional logic, control flow, and binary states. Results from comparison (`==`, `!=`) and logical operations (`&&`, `||`, `!`). \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/break@IWdAJ1BXqJv8EMYvFWRaH.md b/src/data/roadmaps/golang/content/break@IWdAJ1BXqJv8EMYvFWRaH.md index 210b5fd2a..be8cf8616 100644 --- a/src/data/roadmaps/golang/content/break@IWdAJ1BXqJv8EMYvFWRaH.md +++ b/src/data/roadmaps/golang/content/break@IWdAJ1BXqJv8EMYvFWRaH.md @@ -1 +1,3 @@ -# break \ No newline at end of file +# break + +The `break` statement in Go immediately exits the innermost loop (for) or switch statement. In nested loops, break only exits the immediate loop unless used with a label to break out of outer loops. Labels allow you to specify which loop to break from, providing more control in complex nested structures. Break is essential for early loop termination when certain conditions are met, implementing search algorithms, and controlling loop flow based on runtime conditions. Understanding break helps you write more efficient loops that don't continue processing unnecessarily once their purpose is fulfilled. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/bubbletea@x9hDkF73rmvbewrgRgyOv.md b/src/data/roadmaps/golang/content/bubbletea@x9hDkF73rmvbewrgRgyOv.md index 18caf3347..01b72b856 100644 --- a/src/data/roadmaps/golang/content/bubbletea@x9hDkF73rmvbewrgRgyOv.md +++ b/src/data/roadmaps/golang/content/bubbletea@x9hDkF73rmvbewrgRgyOv.md @@ -1 +1,3 @@ -# bubbletea \ No newline at end of file +# bubbletea + +Bubble Tea is a framework for building terminal UIs based on The Elm Architecture. Uses model-update-view pattern for interactive CLI applications with keyboard input, styling, and component composition. Excellent for sophisticated terminal tools and dashboards. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/buffered-vs-unbuffered@4_nvU_YOs9Psey5TZLQFb.md b/src/data/roadmaps/golang/content/buffered-vs-unbuffered@4_nvU_YOs9Psey5TZLQFb.md index 9e68e2bae..b1a3afe80 100644 --- a/src/data/roadmaps/golang/content/buffered-vs-unbuffered@4_nvU_YOs9Psey5TZLQFb.md +++ b/src/data/roadmaps/golang/content/buffered-vs-unbuffered@4_nvU_YOs9Psey5TZLQFb.md @@ -1 +1,3 @@ -# Buffered vs Unbuffered \ No newline at end of file +# Buffered vs Unbuffered + +Channels in Go can be either buffered or unbuffered, which affects their synchronization behavior. Unbuffered channels (created with `make(chan Type)`) provide synchronous communication - the sender blocks until a receiver is ready, ensuring tight synchronization between goroutines. Buffered channels (created with `make(chan Type, capacity)`) allow asynchronous communication up to their capacity - senders only block when the buffer is full, and receivers only block when it's empty. Unbuffered channels are useful for coordination and ensuring operations happen in sequence, while buffered channels help with performance optimization and decoupling producer-consumer timing. Understanding this distinction is crucial for designing effective concurrent systems. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/bufio@Z8j6Zkg1LYEYcoRgs23Ms.md b/src/data/roadmaps/golang/content/bufio@Z8j6Zkg1LYEYcoRgs23Ms.md index a426d9021..544c4b3e2 100644 --- a/src/data/roadmaps/golang/content/bufio@Z8j6Zkg1LYEYcoRgs23Ms.md +++ b/src/data/roadmaps/golang/content/bufio@Z8j6Zkg1LYEYcoRgs23Ms.md @@ -1 +1,3 @@ -# bufio \ No newline at end of file +# bufio + +The `bufio` package provides buffered I/O operations that wrap around existing `io.Reader` and `io.Writer` interfaces to improve performance. Buffered I/O reduces the number of system calls by reading or writing data in larger chunks. The package includes `Scanner` for convenient line-by-line reading, `Reader` for buffered reading with methods like `ReadLine()` and `ReadString()`, and `Writer` for buffered writing. It's particularly useful for processing large files, network operations, and any scenario where frequent small I/O operations would be inefficient. Understanding buffered I/O is important for building efficient applications that handle substantial amounts of data. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/build-constraints--tags@zmBYvecc5zSoLCinH68gc.md b/src/data/roadmaps/golang/content/build-constraints--tags@zmBYvecc5zSoLCinH68gc.md index 870756cd5..b854d20c9 100644 --- a/src/data/roadmaps/golang/content/build-constraints--tags@zmBYvecc5zSoLCinH68gc.md +++ b/src/data/roadmaps/golang/content/build-constraints--tags@zmBYvecc5zSoLCinH68gc.md @@ -1 +1,3 @@ -# Build Constraints & Tags \ No newline at end of file +# Build Constraints & Tags + +Build constraints (also known as build tags) are special comments that control which files are included when building Go programs. They allow you to create platform-specific code, environment-specific builds, or feature toggles. Build constraints are placed at the top of Go files and use the `//go:build` directive (or the older `// +build` format). Common use cases include building different versions for different operating systems, architectures, or creating debug vs production builds. Understanding build constraints is essential for creating portable Go applications that can adapt to different environments and requirements. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/build-tags@Jxt4HD2iA6lRXNRJIVCLs.md b/src/data/roadmaps/golang/content/build-tags@Jxt4HD2iA6lRXNRJIVCLs.md index 884f0d833..a855e01dc 100644 --- a/src/data/roadmaps/golang/content/build-tags@Jxt4HD2iA6lRXNRJIVCLs.md +++ b/src/data/roadmaps/golang/content/build-tags@Jxt4HD2iA6lRXNRJIVCLs.md @@ -1 +1,3 @@ -# Build Tags \ No newline at end of file +# Build Tags + +Build tags control file inclusion using `//go:build` directives based on conditions like OS, architecture, or custom tags. Enable conditional compilation for platform-specific code, feature flags, and environment-specific builds without runtime overhead. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/building-clis@2fk1ewM42WnFlDejVETys.md b/src/data/roadmaps/golang/content/building-clis@2fk1ewM42WnFlDejVETys.md index c69a59b36..ce253da45 100644 --- a/src/data/roadmaps/golang/content/building-clis@2fk1ewM42WnFlDejVETys.md +++ b/src/data/roadmaps/golang/content/building-clis@2fk1ewM42WnFlDejVETys.md @@ -1 +1,3 @@ -# Building CLIs \ No newline at end of file +# Building CLIs + +Go is an excellent choice for building command-line interface (CLI) applications due to its fast compilation, single binary distribution, and rich ecosystem of CLI libraries. You can build CLIs using the standard `flag` package for simple cases, or leverage powerful frameworks like Cobra (used by kubectl, Hugo), urfave/cli, or Bubble Tea for interactive applications. Go CLIs benefit from cross-compilation support, allowing you to build binaries for different platforms easily. Building CLIs is a great way to learn Go while creating useful tools for automation, development workflows, and system administration. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/building-executables@zCUmPIGVslLfECqfUgAr2.md b/src/data/roadmaps/golang/content/building-executables@zCUmPIGVslLfECqfUgAr2.md index 46a3b4342..35c392599 100644 --- a/src/data/roadmaps/golang/content/building-executables@zCUmPIGVslLfECqfUgAr2.md +++ b/src/data/roadmaps/golang/content/building-executables@zCUmPIGVslLfECqfUgAr2.md @@ -1 +1,3 @@ -# Building Executables \ No newline at end of file +# Building Executables + +The `go build` command compiles source code into standalone native executables with static linking. Creates self-contained binaries including all dependencies, requiring no Go installation on target systems. Control builds with various optimization flags. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/call-by-value@z8-8nt-3GA7uN-cvOI-Qn.md b/src/data/roadmaps/golang/content/call-by-value@z8-8nt-3GA7uN-cvOI-Qn.md index a78b219b2..34af0ca20 100644 --- a/src/data/roadmaps/golang/content/call-by-value@z8-8nt-3GA7uN-cvOI-Qn.md +++ b/src/data/roadmaps/golang/content/call-by-value@z8-8nt-3GA7uN-cvOI-Qn.md @@ -1 +1,3 @@ -# Call by Value \ No newline at end of file +# Call by Value + +Go uses call by value for function arguments, meaning that when you pass a variable to a function, Go creates a copy of the value rather than passing the original variable. This applies to all types including integers, strings, structs, and arrays. For large data structures, this copying can be expensive, which is why pointers, slices, and maps (which contain references) are often used instead. Call by value provides safety by preventing functions from accidentally modifying the caller's data, but it also means that functions cannot modify the original values unless you explicitly pass pointers. Understanding this behavior is crucial for effective Go programming and performance optimization. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/capacity-and-growth@qUykEUH1-9Dzotc_ltV3g.md b/src/data/roadmaps/golang/content/capacity-and-growth@qUykEUH1-9Dzotc_ltV3g.md index 9f502b277..8530c7114 100644 --- a/src/data/roadmaps/golang/content/capacity-and-growth@qUykEUH1-9Dzotc_ltV3g.md +++ b/src/data/roadmaps/golang/content/capacity-and-growth@qUykEUH1-9Dzotc_ltV3g.md @@ -1 +1,3 @@ -# Capacity and Growth \ No newline at end of file +# Capacity and Growth + +Slice capacity determines when reallocation occurs during append operations. Go typically doubles capacity for smaller slices. Pre-allocate with `make([]T, length, capacity)` to optimize memory usage and minimize allocations in performance-critical code. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/centrifugo@LOl-7BtdmYrBS0PTtHI1I.md b/src/data/roadmaps/golang/content/centrifugo@LOl-7BtdmYrBS0PTtHI1I.md index 677c708f4..90e9497e5 100644 --- a/src/data/roadmaps/golang/content/centrifugo@LOl-7BtdmYrBS0PTtHI1I.md +++ b/src/data/roadmaps/golang/content/centrifugo@LOl-7BtdmYrBS0PTtHI1I.md @@ -1 +1,3 @@ -# Centrifugo \ No newline at end of file +# Centrifugo + +Centrifugo is a real-time messaging server providing WebSocket services for Go applications. It offers channels, presence info, message history, and Redis scalability. Supports WebSocket, Server-Sent Events, and HTTP streaming while handling complex real-time patterns. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/cgo-basics@mxbs96wFJ5XGDoETA0fU_.md b/src/data/roadmaps/golang/content/cgo-basics@mxbs96wFJ5XGDoETA0fU_.md index d0436f23d..e03b4e1fb 100644 --- a/src/data/roadmaps/golang/content/cgo-basics@mxbs96wFJ5XGDoETA0fU_.md +++ b/src/data/roadmaps/golang/content/cgo-basics@mxbs96wFJ5XGDoETA0fU_.md @@ -1 +1,3 @@ -# CGO Basics \ No newline at end of file +# CGO Basics + +CGO allows Go programs to call C code and vice versa using special comments. Enables C library integration but disables cross-compilation, reduces performance, and complicates deployment. Useful for legacy integration but pure Go is preferred. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/channels@EgXagvLpJkXUI2od5K1FD.md b/src/data/roadmaps/golang/content/channels@EgXagvLpJkXUI2od5K1FD.md index bf27c3575..077c15124 100644 --- a/src/data/roadmaps/golang/content/channels@EgXagvLpJkXUI2od5K1FD.md +++ b/src/data/roadmaps/golang/content/channels@EgXagvLpJkXUI2od5K1FD.md @@ -1 +1,3 @@ -# Channels \ No newline at end of file +# Channels + +Channels are Go's primary mechanism for communication between goroutines, following the principle "Don't communicate by sharing memory; share memory by communicating." Channels are typed conduits that allow you to send and receive values between goroutines safely. They can be created using the `make()` function and come in two varieties: buffered and unbuffered. Channels can be used to synchronize goroutine execution, pass data between concurrent processes, and coordinate complex concurrent operations. Understanding channels is essential for writing effective concurrent programs in Go. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/closures@ZSiNvYDTW2RYyPttls5iz.md b/src/data/roadmaps/golang/content/closures@ZSiNvYDTW2RYyPttls5iz.md index 2bd3198cd..53db735c5 100644 --- a/src/data/roadmaps/golang/content/closures@ZSiNvYDTW2RYyPttls5iz.md +++ b/src/data/roadmaps/golang/content/closures@ZSiNvYDTW2RYyPttls5iz.md @@ -1 +1,3 @@ -# Closures \ No newline at end of file +# Closures + +Closures in Go are functions that capture and access variables from their surrounding scope, even after the outer function returns. They're created when a function references variables declared outside its body, "closing over" those variables. Closures are useful for creating specialized functions, implementing callbacks, maintaining state between function calls, and building factories or configuration functions. Since the captured variables remain accessible to the closure, they can be modified across multiple calls. This makes closures powerful for event handling, iterator patterns, and functional programming techniques. Understanding closures is important for writing flexible, reusable code and working with higher-order functions. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/cobra@3frPZLeFXnHroY7_Uk5Dn.md b/src/data/roadmaps/golang/content/cobra@3frPZLeFXnHroY7_Uk5Dn.md index 5310c6fa7..a03168c4d 100644 --- a/src/data/roadmaps/golang/content/cobra@3frPZLeFXnHroY7_Uk5Dn.md +++ b/src/data/roadmaps/golang/content/cobra@3frPZLeFXnHroY7_Uk5Dn.md @@ -1 +1,3 @@ -# Cobra \ No newline at end of file +# Cobra + +Cobra is a powerful library for creating modern CLI applications in Go. It's used by many popular projects including Kubernetes (kubectl), Hugo, and GitHub CLI. Cobra provides features like nested subcommands, global and local flags, intelligent suggestions, automatic help generation, and shell completion. It follows POSIX standards and offers a clean API for building complex command-line interfaces. Cobra also includes a command generator to bootstrap CLI applications quickly. The library handles argument parsing, flag management, and help text generation automatically, allowing developers to focus on implementing command logic rather than CLI infrastructure. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/code-generation--build-tags@build-system.md b/src/data/roadmaps/golang/content/code-generation--build-tags@build-system.md new file mode 100644 index 000000000..00356fccd --- /dev/null +++ b/src/data/roadmaps/golang/content/code-generation--build-tags@build-system.md @@ -0,0 +1,3 @@ +# Code Generation / Build Tags + +Code generation with `go generate` automates boilerplate creation, while build tags enable conditional compilation for different platforms and environments. These tools help create flexible, maintainable applications with platform-specific implementations and feature flags without runtime overhead. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/code-quality-and-analysis@core-quality-tools.md b/src/data/roadmaps/golang/content/code-quality-and-analysis@core-quality-tools.md new file mode 100644 index 000000000..9d5d9013c --- /dev/null +++ b/src/data/roadmaps/golang/content/code-quality-and-analysis@core-quality-tools.md @@ -0,0 +1,3 @@ +# Code Quality and Analysis + +Go provides tools for maintaining code quality including static analyzers, style checkers, and security scanners. Built-in tools like `go vet` provide basic analysis, while ecosystem tools like staticcheck and golangci-lint offer advanced checking for bugs, style, and security issues. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/comma-ok-idiom@dMdOz2kUc8If3LcLZEfYf.md b/src/data/roadmaps/golang/content/comma-ok-idiom@dMdOz2kUc8If3LcLZEfYf.md index a15dd0a22..1b7c959d7 100644 --- a/src/data/roadmaps/golang/content/comma-ok-idiom@dMdOz2kUc8If3LcLZEfYf.md +++ b/src/data/roadmaps/golang/content/comma-ok-idiom@dMdOz2kUc8If3LcLZEfYf.md @@ -1 +1,3 @@ -# Comma-Ok Idiom \ No newline at end of file +# Comma-Ok Idiom + +Pattern for safely testing map key existence or type assertion success using `value, ok := map[key]` or `value, ok := interface.(Type)`. Returns both value and boolean status, preventing panics and distinguishing zero values from missing keys. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/commands--docs@ywiNCAAvpSVXTwWwguxSZ.md b/src/data/roadmaps/golang/content/commands--docs@ywiNCAAvpSVXTwWwguxSZ.md index 9a64a7659..0febabb39 100644 --- a/src/data/roadmaps/golang/content/commands--docs@ywiNCAAvpSVXTwWwguxSZ.md +++ b/src/data/roadmaps/golang/content/commands--docs@ywiNCAAvpSVXTwWwguxSZ.md @@ -1 +1,3 @@ -# Commands & Docs \ No newline at end of file +# Commands & Docs + +Go provides built-in documentation tools including `go doc` for terminal documentation and `godoc` for web interface. Documentation uses special comments. `go help` provides command information. Essential for exploring standard library and writing well-documented code. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/common-usecases@gChqUzY3SbPJH0H0jcoAp.md b/src/data/roadmaps/golang/content/common-usecases@gChqUzY3SbPJH0H0jcoAp.md index b5fa61e2d..6746f751a 100644 --- a/src/data/roadmaps/golang/content/common-usecases@gChqUzY3SbPJH0H0jcoAp.md +++ b/src/data/roadmaps/golang/content/common-usecases@gChqUzY3SbPJH0H0jcoAp.md @@ -1 +1,3 @@ -# Common Usecases \ No newline at end of file +# Common Usecases + +Context package common uses: HTTP timeouts, database deadlines, goroutine cancellation coordination, and request-scoped values. Essential for web servers, microservices, circuit breakers, and building responsive APIs that handle cancellation gracefully. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/compiler--linker-flags@xsjUeyxweN2GbcjknDjT8.md b/src/data/roadmaps/golang/content/compiler--linker-flags@xsjUeyxweN2GbcjknDjT8.md index 2ee9d4365..af4d04ff3 100644 --- a/src/data/roadmaps/golang/content/compiler--linker-flags@xsjUeyxweN2GbcjknDjT8.md +++ b/src/data/roadmaps/golang/content/compiler--linker-flags@xsjUeyxweN2GbcjknDjT8.md @@ -1 +1,3 @@ -# Compiler & Linker Flags \ No newline at end of file +# Compiler & Linker Flags + +Build flags control compilation and linking. Common flags include `-ldflags` for linker options, `-gcflags` for compiler settings, `-tags` for build tags, and `-race` for race detection. Help optimize builds, reduce binary size, and embed build information. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/complex-numbers@Mn-M7kxOKEublJGitgjNA.md b/src/data/roadmaps/golang/content/complex-numbers@Mn-M7kxOKEublJGitgjNA.md index 71cd5c05c..906ef4ce1 100644 --- a/src/data/roadmaps/golang/content/complex-numbers@Mn-M7kxOKEublJGitgjNA.md +++ b/src/data/roadmaps/golang/content/complex-numbers@Mn-M7kxOKEublJGitgjNA.md @@ -1 +1,3 @@ -# Complex Numbers \ No newline at end of file +# Complex Numbers + +Built-in support with `complex64` and `complex128` types. Create using `complex()` function or literals like `3+4i`. Provides `real()`, `imag()`, `abs()` functions. Useful for mathematical computations, signal processing, and scientific applications. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/concurrency-patterns@2yKVKaCXrcv5X4o2d6oqm.md b/src/data/roadmaps/golang/content/concurrency-patterns@2yKVKaCXrcv5X4o2d6oqm.md index 76a5c38ca..abd402a8c 100644 --- a/src/data/roadmaps/golang/content/concurrency-patterns@2yKVKaCXrcv5X4o2d6oqm.md +++ b/src/data/roadmaps/golang/content/concurrency-patterns@2yKVKaCXrcv5X4o2d6oqm.md @@ -1 +1,3 @@ -# Concurrency Patterns \ No newline at end of file +# Concurrency Patterns + +Concurrency patterns in Go are established design approaches for structuring concurrent programs using goroutines and channels. These patterns provide proven solutions for common concurrent programming challenges such as distributing work, aggregating results, and coordinating multiple processes. Key patterns include fan-in (merging multiple inputs), fan-out (distributing work to multiple workers), pipelines (chaining operations), worker pools (managing a fixed number of workers), and pub-sub (publisher-subscriber communication). Understanding these patterns helps you build efficient, scalable concurrent applications while avoiding common pitfalls like race conditions and deadlocks. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/conditionals@C7wzT161ytHsCpO2zfmXo.md b/src/data/roadmaps/golang/content/conditionals@C7wzT161ytHsCpO2zfmXo.md index e36a33870..07736cdd2 100644 --- a/src/data/roadmaps/golang/content/conditionals@C7wzT161ytHsCpO2zfmXo.md +++ b/src/data/roadmaps/golang/content/conditionals@C7wzT161ytHsCpO2zfmXo.md @@ -1 +1,3 @@ -# Conditionals \ No newline at end of file +# Conditionals + +Conditionals in Go allow your program to make decisions and execute different code paths based on certain conditions. Go provides `if` statements for basic conditional logic, `if-else` for binary decisions, and `switch` statements for multiple condition checking. The `if` statement can include an optional initialization statement, and conditions don't require parentheses but the body must be enclosed in braces. Go's `switch` statement is more powerful than in many languages, supporting expression switches, type switches, and fallthrough behavior. Conditionals are fundamental for controlling program flow and implementing business logic. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/const-and-iota@-M-qrXwVt7HfJv0CSRNGS.md b/src/data/roadmaps/golang/content/const-and-iota@-M-qrXwVt7HfJv0CSRNGS.md index a73853f57..4b3ba3c93 100644 --- a/src/data/roadmaps/golang/content/const-and-iota@-M-qrXwVt7HfJv0CSRNGS.md +++ b/src/data/roadmaps/golang/content/const-and-iota@-M-qrXwVt7HfJv0CSRNGS.md @@ -1 +1,3 @@ -# const and iota \ No newline at end of file +# const and iota + +Constants declared with `const` represent unchanging compile-time values. `iota` creates successive integer constants starting from zero, resetting per `const` block. Useful for enumerations, bit flags, and constant sequences without manual values. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/context-package@vxB3aGreqWBrNhiu8hcPE.md b/src/data/roadmaps/golang/content/context-package@vxB3aGreqWBrNhiu8hcPE.md index 57e31a12d..e9eae0c2d 100644 --- a/src/data/roadmaps/golang/content/context-package@vxB3aGreqWBrNhiu8hcPE.md +++ b/src/data/roadmaps/golang/content/context-package@vxB3aGreqWBrNhiu8hcPE.md @@ -1 +1,3 @@ -# `context` Package \ No newline at end of file +# `context` Package + +The `context` package provides a way to carry deadlines, cancellation signals, and request-scoped values across API boundaries and between processes. Context is essential for building robust concurrent applications, especially web services and APIs. It allows you to cancel long-running operations, set timeouts, and pass request-specific data through your application. The context is typically the first parameter of functions and is passed down through the call stack. Understanding context is crucial for writing production-ready Go applications that can handle cancellation, timeouts, and cleanup gracefully. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/continue@BRKryB5HawXyXeBWM4QqU.md b/src/data/roadmaps/golang/content/continue@BRKryB5HawXyXeBWM4QqU.md index c71c643ff..292d40444 100644 --- a/src/data/roadmaps/golang/content/continue@BRKryB5HawXyXeBWM4QqU.md +++ b/src/data/roadmaps/golang/content/continue@BRKryB5HawXyXeBWM4QqU.md @@ -1 +1,3 @@ -# continue \ No newline at end of file +# continue + +The `continue` statement in Go skips the rest of the current iteration and jumps to the next iteration of the loop. It only affects the innermost loop unless used with labels to specify which loop to continue. Continue is useful for skipping processing of certain elements that don't meet specific criteria, implementing filtering logic within loops, and avoiding deeply nested conditional structures. It helps make loops more readable by handling special cases early and allowing the main logic to flow naturally. Understanding continue enables you to write cleaner, more efficient loops that focus on the elements that actually need processing. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/coverage@27lhNAdKwRrc2S2ha3QNG.md b/src/data/roadmaps/golang/content/coverage@27lhNAdKwRrc2S2ha3QNG.md index 90f0ceae8..8528185f0 100644 --- a/src/data/roadmaps/golang/content/coverage@27lhNAdKwRrc2S2ha3QNG.md +++ b/src/data/roadmaps/golang/content/coverage@27lhNAdKwRrc2S2ha3QNG.md @@ -1 +1,3 @@ -# Coverage \ No newline at end of file +# Coverage + +Test coverage measures code execution during testing using `go test -cover` and `-coverprofile`. Visualize with `go tool cover -html` to identify untested code paths. Helps maintain quality standards and guide testing efforts for more reliable applications. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/cross-compilation@mvcWcecHA_jyQY1txFgL_.md b/src/data/roadmaps/golang/content/cross-compilation@mvcWcecHA_jyQY1txFgL_.md index 2df0b9f03..e21ba4d95 100644 --- a/src/data/roadmaps/golang/content/cross-compilation@mvcWcecHA_jyQY1txFgL_.md +++ b/src/data/roadmaps/golang/content/cross-compilation@mvcWcecHA_jyQY1txFgL_.md @@ -1 +1,3 @@ -# Cross-compilation \ No newline at end of file +# Cross-compilation + +Build executables for different OS and architectures using `GOOS` and `GOARCH` environment variables. Example: `GOOS=linux GOARCH=amd64 go build` creates Linux binaries. Enables multi-platform development without separate build environments. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/data-types@0FJxELyk7_IiVHvZFFVm2.md b/src/data/roadmaps/golang/content/data-types@0FJxELyk7_IiVHvZFFVm2.md index c8efc9c3d..bea182c06 100644 --- a/src/data/roadmaps/golang/content/data-types@0FJxELyk7_IiVHvZFFVm2.md +++ b/src/data/roadmaps/golang/content/data-types@0FJxELyk7_IiVHvZFFVm2.md @@ -1 +1,3 @@ -# Data Types \ No newline at end of file +# Data Types + +Go has a rich set of built-in data types that form the foundation of all Go programs. These include basic types like integers (int8, int16, int32, int64), unsigned integers (uint8, uint16, uint32, uint64), floating-point numbers (float32, float64), complex numbers (complex64, complex128), booleans, strings, and runes (Unicode characters). Go is statically typed, meaning variable types are determined at compile time, which helps catch errors early and improves performance. Understanding Go's type system is crucial for writing efficient and reliable programs, as it affects memory usage, performance, and how you structure your data. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/deadlines--cancellations@p5u2tWRmRtyfBgKcSUHFU.md b/src/data/roadmaps/golang/content/deadlines--cancellations@p5u2tWRmRtyfBgKcSUHFU.md index 9ad779182..33836bb43 100644 --- a/src/data/roadmaps/golang/content/deadlines--cancellations@p5u2tWRmRtyfBgKcSUHFU.md +++ b/src/data/roadmaps/golang/content/deadlines--cancellations@p5u2tWRmRtyfBgKcSUHFU.md @@ -1 +1,3 @@ -# Deadlines & Cancellations \ No newline at end of file +# Deadlines & Cancellations + +Context package mechanisms for controlling operation lifetime and propagating cancellation signals. Supports deadlines (absolute time) or timeouts (duration). Functions should check `ctx.Done()` and return early when cancelled. Essential for robust concurrent applications. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/deployment--tooling@deploy-optimize.md b/src/data/roadmaps/golang/content/deployment--tooling@deploy-optimize.md new file mode 100644 index 000000000..317d77a60 --- /dev/null +++ b/src/data/roadmaps/golang/content/deployment--tooling@deploy-optimize.md @@ -0,0 +1,3 @@ +# Deployment & Tooling + +Go deployment focuses on building optimized binaries for production. Static compilation creates self-contained executables, while cross-compilation builds for multiple platforms. Key aspects include containerization, configuration management, monitoring, and binary optimization for efficient production deployments. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/echo@1qhqEYf6wYf5sfXgTUnmi.md b/src/data/roadmaps/golang/content/echo@1qhqEYf6wYf5sfXgTUnmi.md index 0a3325979..47323a671 100644 --- a/src/data/roadmaps/golang/content/echo@1qhqEYf6wYf5sfXgTUnmi.md +++ b/src/data/roadmaps/golang/content/echo@1qhqEYf6wYf5sfXgTUnmi.md @@ -1 +1,3 @@ -# echo \ No newline at end of file +# echo + +Echo is a high-performance, minimalist web framework for Go that focuses on ease of use and speed. It provides essential features for building APIs and web applications including optimized routing, middleware support, data binding, validation, and rendering. Echo's API is designed to be intuitive and requires minimal learning curve while offering powerful features like automatic TLS support, HTTP/2 support, and WebSocket handling. The framework includes built-in middleware for CORS, JWT authentication, logging, and compression. Echo is particularly popular for building RESTful APIs and microservices due to its excellent performance characteristics and comprehensive feature set. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/embedding-interfaces@wK7GNTbOsMNs0N_1N4-dU.md b/src/data/roadmaps/golang/content/embedding-interfaces@wK7GNTbOsMNs0N_1N4-dU.md index e8d394b3a..033a05320 100644 --- a/src/data/roadmaps/golang/content/embedding-interfaces@wK7GNTbOsMNs0N_1N4-dU.md +++ b/src/data/roadmaps/golang/content/embedding-interfaces@wK7GNTbOsMNs0N_1N4-dU.md @@ -1 +1,3 @@ -# Embedding Interfaces \ No newline at end of file +# Embedding Interfaces + +Interface embedding in Go allows you to create new interfaces by combining existing ones, promoting interface composition and reusability. When you embed an interface in another interface, the new interface automatically includes all methods from the embedded interface. This creates interface hierarchies and enables building complex interfaces from simpler, focused ones. Interface embedding supports the principle of composition over inheritance, allows for incremental interface definition, and helps create more maintainable and flexible designs. It's commonly used in standard library interfaces and is essential for building modular, extensible systems where interfaces can grow organically while maintaining backward compatibility. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/embedding-structs@XLj16RmCe4-nKHW52Ebhf.md b/src/data/roadmaps/golang/content/embedding-structs@XLj16RmCe4-nKHW52Ebhf.md index 61eddc0e5..efb27e38d 100644 --- a/src/data/roadmaps/golang/content/embedding-structs@XLj16RmCe4-nKHW52Ebhf.md +++ b/src/data/roadmaps/golang/content/embedding-structs@XLj16RmCe4-nKHW52Ebhf.md @@ -1 +1,3 @@ -# Embedding Structs \ No newline at end of file +# Embedding Structs + +Struct embedding includes one struct inside another without field names, making embedded fields directly accessible. Provides composition-based design following Go's philosophy of composition over inheritance. Enables flexible, reusable components. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/empty-interfaces@ueJ7ndK2SKniDVjN2aUlO.md b/src/data/roadmaps/golang/content/empty-interfaces@ueJ7ndK2SKniDVjN2aUlO.md index 8812c7e65..faad83cbf 100644 --- a/src/data/roadmaps/golang/content/empty-interfaces@ueJ7ndK2SKniDVjN2aUlO.md +++ b/src/data/roadmaps/golang/content/empty-interfaces@ueJ7ndK2SKniDVjN2aUlO.md @@ -1 +1,3 @@ -# Empty Interfaces \ No newline at end of file +# Empty Interfaces + +Empty interfaces (`interface{}`) in Go can hold values of any type since they specify no methods. While powerful for creating flexible APIs and generic containers, they sacrifice compile-time type safety for runtime flexibility. With Go 1.18+, generics often provide a better alternative to empty interfaces for type-safe generic programming. Empty interfaces are still useful for scenarios like JSON unmarshaling, building general-purpose containers, implementing reflection-based libraries, and interfacing with dynamic systems. When using empty interfaces, you typically need type assertions or type switches to work with the actual values, so they should be used judiciously and with proper error handling. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/error-handling-basics@7EKUfKx7_7lZOs3d84iyL.md b/src/data/roadmaps/golang/content/error-handling-basics@7EKUfKx7_7lZOs3d84iyL.md index ac5eec83d..675426b1c 100644 --- a/src/data/roadmaps/golang/content/error-handling-basics@7EKUfKx7_7lZOs3d84iyL.md +++ b/src/data/roadmaps/golang/content/error-handling-basics@7EKUfKx7_7lZOs3d84iyL.md @@ -1 +1,3 @@ -# Error Handling Basics \ No newline at end of file +# Error Handling Basics + +Error handling in Go follows an explicit approach where functions return an error as their last return value. Unlike languages that use exceptions, Go treats errors as values that must be explicitly checked and handled. The conventional pattern is to check if an error is nil (no error occurred) or handle the error appropriately. This approach makes error handling visible in the code flow and encourages developers to think about and handle potential failures at each step. Go's error handling philosophy emphasizes clarity and forces you to consider what should happen when things go wrong. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/error-interface@0mMP6QR0V-Zi25njD1TFT.md b/src/data/roadmaps/golang/content/error-interface@0mMP6QR0V-Zi25njD1TFT.md index 6a329a1ad..6749506b2 100644 --- a/src/data/roadmaps/golang/content/error-interface@0mMP6QR0V-Zi25njD1TFT.md +++ b/src/data/roadmaps/golang/content/error-interface@0mMP6QR0V-Zi25njD1TFT.md @@ -1 +1,3 @@ -# `error` interface \ No newline at end of file +# `error` interface + +Built-in interface with single `Error() string` method. Any type implementing this method can represent an error. Central to Go's error handling philosophy, providing consistent error representation across all Go code. Fundamental for effective error handling. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/errorsnew@dHk6Y0zFqxtCuDiQcHQsi.md b/src/data/roadmaps/golang/content/errorsnew@dHk6Y0zFqxtCuDiQcHQsi.md index 7fa9e2cd0..d83dd51e7 100644 --- a/src/data/roadmaps/golang/content/errorsnew@dHk6Y0zFqxtCuDiQcHQsi.md +++ b/src/data/roadmaps/golang/content/errorsnew@dHk6Y0zFqxtCuDiQcHQsi.md @@ -1 +1,3 @@ -# errors.New \ No newline at end of file +# errors.New + +Simplest way to create error values by taking a string message and returning an error implementing the error interface. Useful for simple, static error messages. Often combined with error wrapping or used for predefined error constants. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/escape-analysis@ixoXVtRlrvTittqQq-Bgo.md b/src/data/roadmaps/golang/content/escape-analysis@ixoXVtRlrvTittqQq-Bgo.md index 4d570f675..17ad9ba26 100644 --- a/src/data/roadmaps/golang/content/escape-analysis@ixoXVtRlrvTittqQq-Bgo.md +++ b/src/data/roadmaps/golang/content/escape-analysis@ixoXVtRlrvTittqQq-Bgo.md @@ -1 +1,3 @@ -# Escape Analysis \ No newline at end of file +# Escape Analysis + +Compile-time optimization determining whether variables are allocated on stack (fast) or heap (GC required). Variables that "escape" their scope need heap allocation. Use `go build -gcflags="-m"` to view decisions. Understanding helps minimize heap allocations and reduce GC pressure. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/fan-in@8BrnnM7HM-bijbUDgnW49.md b/src/data/roadmaps/golang/content/fan-in@8BrnnM7HM-bijbUDgnW49.md index 53d9168c6..2d56833a8 100644 --- a/src/data/roadmaps/golang/content/fan-in@8BrnnM7HM-bijbUDgnW49.md +++ b/src/data/roadmaps/golang/content/fan-in@8BrnnM7HM-bijbUDgnW49.md @@ -1 +1,3 @@ -# fan-in \ No newline at end of file +# fan-in + +Fan-in is a concurrency pattern where multiple input channels are merged into a single output channel. This pattern is useful for aggregating results from multiple goroutines, combining data streams, or centralizing processing from various sources. Implementation typically involves a function that starts goroutines to read from each input channel and forward values to a shared output channel. Fan-in helps simplify complex systems by providing a single point to collect distributed work results. It's commonly used in scenarios like distributed processing, load balancing, and event aggregation where you need to merge multiple concurrent data streams into one. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/fan-out@pN8EsuKUPDUKyskodu_sC.md b/src/data/roadmaps/golang/content/fan-out@pN8EsuKUPDUKyskodu_sC.md index ec6ff2fdf..859620282 100644 --- a/src/data/roadmaps/golang/content/fan-out@pN8EsuKUPDUKyskodu_sC.md +++ b/src/data/roadmaps/golang/content/fan-out@pN8EsuKUPDUKyskodu_sC.md @@ -1 +1,3 @@ -# fan-out \ No newline at end of file +# fan-out + +Fan-out is a concurrency pattern where work from a single input channel is distributed to multiple worker goroutines for parallel processing. This pattern is effective for distributing computationally intensive tasks across multiple processors or handling high-throughput scenarios. Implementation involves multiple goroutines reading from the same input channel, with Go's runtime automatically distributing the work among available workers. Fan-out improves performance by leveraging parallelism and is particularly useful for CPU-bound tasks, batch processing, and scenarios where work can be processed independently. It's often combined with fan-in to collect results after parallel processing. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/fiber@5lJPsJwgy0_T7Xl6eQxuB.md b/src/data/roadmaps/golang/content/fiber@5lJPsJwgy0_T7Xl6eQxuB.md index 6f1d5f53d..3bebed596 100644 --- a/src/data/roadmaps/golang/content/fiber@5lJPsJwgy0_T7Xl6eQxuB.md +++ b/src/data/roadmaps/golang/content/fiber@5lJPsJwgy0_T7Xl6eQxuB.md @@ -1 +1,3 @@ -# fiber \ No newline at end of file +# fiber + +Fiber is an Express-inspired web framework built on fasthttp for exceptional performance. Provides familiar API with middleware, routing, templates, and WebSocket support. Popular for high-performance REST APIs and microservices requiring speed and simplicity. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/flag@-8E79Ns4q-uAgcxtghPzf.md b/src/data/roadmaps/golang/content/flag@-8E79Ns4q-uAgcxtghPzf.md index 89a54c725..c4a00e5a5 100644 --- a/src/data/roadmaps/golang/content/flag@-8E79Ns4q-uAgcxtghPzf.md +++ b/src/data/roadmaps/golang/content/flag@-8E79Ns4q-uAgcxtghPzf.md @@ -1 +1,3 @@ -# flag \ No newline at end of file +# flag + +The `flag` package provides command-line flag parsing functionality for Go programs. It supports various flag types including strings, integers, booleans, and durations, with automatic help generation and error handling. Flags can be defined using functions like `flag.String()`, `flag.Int()`, and `flag.Bool()`, and are parsed with `flag.Parse()`. The package handles both short and long flag formats, provides default values, and generates usage information automatically. While suitable for simple CLI applications, more complex command-line interfaces often benefit from libraries like Cobra or urfave/cli. Understanding the flag package is essential for creating basic command-line tools and scripts. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/floating-points@EzaH378F3kOdQbczhVjhA.md b/src/data/roadmaps/golang/content/floating-points@EzaH378F3kOdQbczhVjhA.md index d424ea506..e97df6a2d 100644 --- a/src/data/roadmaps/golang/content/floating-points@EzaH378F3kOdQbczhVjhA.md +++ b/src/data/roadmaps/golang/content/floating-points@EzaH378F3kOdQbczhVjhA.md @@ -1 +1,3 @@ -# Floating Points \ No newline at end of file +# Floating Points + +Two types: `float32` (single precision) and `float64` (double precision, default). Represent real numbers using IEEE 754 standard. Can introduce precision errors, not suitable for exact financial calculations. Essential for scientific computing and graphics. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/fmterrorf@LVaWjZfij6-z_uwkAc0MK.md b/src/data/roadmaps/golang/content/fmterrorf@LVaWjZfij6-z_uwkAc0MK.md index 6d2c52a98..6196ea8ae 100644 --- a/src/data/roadmaps/golang/content/fmterrorf@LVaWjZfij6-z_uwkAc0MK.md +++ b/src/data/roadmaps/golang/content/fmterrorf@LVaWjZfij6-z_uwkAc0MK.md @@ -1 +1,3 @@ -# fmt.Errorf \ No newline at end of file +# fmt.Errorf + +Creates formatted error messages using printf-style verbs. Supports `%w` verb for error wrapping (Go 1.13+) to create error chains preserving original errors while adding context. Essential for descriptive errors with dynamic values and debugging information. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/for-loop@ijS-b400c9BldRO6PlrC1.md b/src/data/roadmaps/golang/content/for-loop@ijS-b400c9BldRO6PlrC1.md index a69559720..14f97b861 100644 --- a/src/data/roadmaps/golang/content/for-loop@ijS-b400c9BldRO6PlrC1.md +++ b/src/data/roadmaps/golang/content/for-loop@ijS-b400c9BldRO6PlrC1.md @@ -1 +1,3 @@ -# for loop \ No newline at end of file +# for loop + +The for loop is Go's only looping construct, but it's flexible enough to handle all iteration scenarios. The traditional three-component form `for init; condition; post` works like loops in other languages, while you can omit components for different behaviors. For example, omitting init and post creates a while-style loop, and omitting all components creates an infinite loop. The for loop is essential for repetitive operations, iterating over data structures, and implementing algorithms that require repeated execution. Its simplicity and versatility make it a fundamental tool for controlling program flow and processing collections of data. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/for-range@j0w6e8Pksh30PKDvXj3yk.md b/src/data/roadmaps/golang/content/for-range@j0w6e8Pksh30PKDvXj3yk.md index ac098211b..898b42845 100644 --- a/src/data/roadmaps/golang/content/for-range@j0w6e8Pksh30PKDvXj3yk.md +++ b/src/data/roadmaps/golang/content/for-range@j0w6e8Pksh30PKDvXj3yk.md @@ -1 +1,3 @@ -# for range \ No newline at end of file +# for range + +The `for range` loop in Go provides a convenient way to iterate over arrays, slices, maps, strings, and channels. It automatically handles iteration logic and provides access to both index/key and value for each element. When ranging over slices or arrays, you get index and value; over maps, you get key and value; over strings, you get byte index and rune value; and over channels, you get the received values. You can use the blank identifier `_` to ignore index/key if you only need values. The range loop is essential for processing collections and is more idiomatic and safer than manual index-based iteration in most cases. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/functions-basics@MBafBhpEV_7qgDNPOIBBs.md b/src/data/roadmaps/golang/content/functions-basics@MBafBhpEV_7qgDNPOIBBs.md index f05fcf7e0..493c41fed 100644 --- a/src/data/roadmaps/golang/content/functions-basics@MBafBhpEV_7qgDNPOIBBs.md +++ b/src/data/roadmaps/golang/content/functions-basics@MBafBhpEV_7qgDNPOIBBs.md @@ -1 +1,3 @@ -# Functions Basics \ No newline at end of file +# Functions Basics + +Function basics in Go cover the fundamental syntax and concepts for creating reusable code blocks. Functions are declared with the `func` keyword, followed by name, parameters in parentheses, optional return types, and the function body in braces. Go functions can have zero or more parameters, each with a specified type, and can return zero or more values. Function names that start with capital letters are exported (public), while lowercase names are unexported (private) to the package. Understanding function basics is essential for organizing code, creating modular programs, and following Go's conventions for code structure and visibility. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/functions@axhcEfCEoFkLey4AbA84A.md b/src/data/roadmaps/golang/content/functions@axhcEfCEoFkLey4AbA84A.md index cebcc2697..589e2f895 100644 --- a/src/data/roadmaps/golang/content/functions@axhcEfCEoFkLey4AbA84A.md +++ b/src/data/roadmaps/golang/content/functions@axhcEfCEoFkLey4AbA84A.md @@ -1 +1,3 @@ -# Functions \ No newline at end of file +# Functions + +Functions are the fundamental building blocks of Go programs that allow you to organize code into reusable pieces. In Go, functions are declared using the `func` keyword followed by the function name, parameters, return types, and function body. Functions can accept zero or more parameters, return zero or more values, and can be called from other parts of your program. Go functions have several unique features including multiple return values, named return values, variadic parameters, and first-class function support. Understanding functions is crucial for writing clean, maintainable, and efficient Go code. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/garbage-collection@GG0j6MNVudvITHEOXUxim.md b/src/data/roadmaps/golang/content/garbage-collection@GG0j6MNVudvITHEOXUxim.md index 3044b0a5b..b1a1ee684 100644 --- a/src/data/roadmaps/golang/content/garbage-collection@GG0j6MNVudvITHEOXUxim.md +++ b/src/data/roadmaps/golang/content/garbage-collection@GG0j6MNVudvITHEOXUxim.md @@ -1 +1,3 @@ -# Garbage Collection \ No newline at end of file +# Garbage Collection + +Go's GC automatically reclaims unreachable memory using concurrent, tri-color mark-and-sweep collector designed for minimal pause times. Runs concurrently with your program. Understanding GC helps write efficient programs that work well with automatic memory management. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/generic-functions@p7L4EUsjMnJlrbb-oDvlf.md b/src/data/roadmaps/golang/content/generic-functions@p7L4EUsjMnJlrbb-oDvlf.md index 38c4fb999..a24ba5b85 100644 --- a/src/data/roadmaps/golang/content/generic-functions@p7L4EUsjMnJlrbb-oDvlf.md +++ b/src/data/roadmaps/golang/content/generic-functions@p7L4EUsjMnJlrbb-oDvlf.md @@ -1 +1,3 @@ -# Generic Functions \ No newline at end of file +# Generic Functions + +Write functions working with multiple types using type parameters in square brackets like `func FunctionName[T any](param T) T`. Enable reusable algorithms maintaining type safety. Particularly useful for utility functions and data processing that don't depend on specific types. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/generic-types--interfaces@eWZzradMaH57H4mI7Qw6n.md b/src/data/roadmaps/golang/content/generic-types--interfaces@eWZzradMaH57H4mI7Qw6n.md index 821a7c7f5..7f43c999d 100644 --- a/src/data/roadmaps/golang/content/generic-types--interfaces@eWZzradMaH57H4mI7Qw6n.md +++ b/src/data/roadmaps/golang/content/generic-types--interfaces@eWZzradMaH57H4mI7Qw6n.md @@ -1 +1,3 @@ -# Generic Types / Interfaces \ No newline at end of file +# Generic Types / Interfaces + +Create reusable data structures and interface definitions working with multiple types. Define with type parameters like `type Container[T any] struct { value T }`. Enable type-safe containers, generic slices, maps, and custom structures while maintaining Go's strong typing. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/generics@uEpTANOBHlFwCg5p44Lh0.md b/src/data/roadmaps/golang/content/generics@uEpTANOBHlFwCg5p44Lh0.md index 380856fe4..975074dd8 100644 --- a/src/data/roadmaps/golang/content/generics@uEpTANOBHlFwCg5p44Lh0.md +++ b/src/data/roadmaps/golang/content/generics@uEpTANOBHlFwCg5p44Lh0.md @@ -1 +1,3 @@ -# Generics \ No newline at end of file +# Generics + +Generics, introduced in Go 1.18, allow you to write functions and types that can work with different data types while maintaining type safety. They enable you to create reusable code that doesn't sacrifice performance or type checking. With generics, you can write a single function or data structure that works with multiple types instead of having to duplicate code for each type. Generics use type parameters (written in square brackets) and type constraints to define which types are acceptable. This feature makes Go code more flexible and reduces code duplication while preserving the language's strong typing system. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/gin@xM1uUCXNrJwfTgi9E75KV.md b/src/data/roadmaps/golang/content/gin@xM1uUCXNrJwfTgi9E75KV.md index e9966bfab..5541b1a75 100644 --- a/src/data/roadmaps/golang/content/gin@xM1uUCXNrJwfTgi9E75KV.md +++ b/src/data/roadmaps/golang/content/gin@xM1uUCXNrJwfTgi9E75KV.md @@ -1 +1,3 @@ -# gin \ No newline at end of file +# gin + +Gin is a popular HTTP web framework for Go that emphasizes performance and developer productivity. It provides a lightweight yet feature-rich foundation for building APIs and web services with minimal boilerplate code. Gin offers fast routing, middleware support, JSON validation, error management, and built-in rendering for JSON, XML, and HTML. Its API is clean and intuitive, making it easy to build RESTful services quickly. Gin includes useful features like parameter binding, file uploads, static file serving, and logging middleware. It's an excellent choice for developers who want more features than the standard library while maintaining high performance and simplicity. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-build@LXqEJwGA_0cVUbF6DVwBG.md b/src/data/roadmaps/golang/content/go-build@LXqEJwGA_0cVUbF6DVwBG.md index f81e0f6ed..2952e354e 100644 --- a/src/data/roadmaps/golang/content/go-build@LXqEJwGA_0cVUbF6DVwBG.md +++ b/src/data/roadmaps/golang/content/go-build@LXqEJwGA_0cVUbF6DVwBG.md @@ -1 +1,3 @@ -# go build \ No newline at end of file +# go build + +The `go build` command compiles Go packages and creates executable binaries. It reads Go source files, resolves dependencies, and produces optimized machine code for the target platform. The command can build single files, packages, or entire modules. By default, it creates an executable with the package name in the current directory. You can specify output names with `-o flag`, target different platforms with `GOOS` and `GOARCH` environment variables, and control various compilation options. Understanding `go build` is essential for creating deployable applications and optimizing build processes for different environments. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-clean@bxXzXM0zUm1vux1DKOLyf.md b/src/data/roadmaps/golang/content/go-clean@bxXzXM0zUm1vux1DKOLyf.md index d68e7af0e..2d77e5d03 100644 --- a/src/data/roadmaps/golang/content/go-clean@bxXzXM0zUm1vux1DKOLyf.md +++ b/src/data/roadmaps/golang/content/go-clean@bxXzXM0zUm1vux1DKOLyf.md @@ -1 +1,3 @@ -# go clean \ No newline at end of file +# go clean + +Removes object files and cached files from build process. Options include `-cache` for build cache and `-modcache` for module downloads. Useful for troubleshooting build issues, freeing disk space, and ensuring clean builds. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-command@_3_tFOpQisx6DSP4Yc2E2.md b/src/data/roadmaps/golang/content/go-command@_3_tFOpQisx6DSP4Yc2E2.md index 966b0b98f..e269916c4 100644 --- a/src/data/roadmaps/golang/content/go-command@_3_tFOpQisx6DSP4Yc2E2.md +++ b/src/data/roadmaps/golang/content/go-command@_3_tFOpQisx6DSP4Yc2E2.md @@ -1 +1,3 @@ -# `go` command \ No newline at end of file +# `go` command + +Primary tool for managing Go source code with unified interface for compiling, testing, formatting, and managing dependencies. Includes subcommands like `build`, `run`, `test`, `fmt`, `mod`. Handles the entire development workflow automatically. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-doc@SoD0P5k4aSVRN96XxR5on.md b/src/data/roadmaps/golang/content/go-doc@SoD0P5k4aSVRN96XxR5on.md index dd1eb07e6..11b9c2a4c 100644 --- a/src/data/roadmaps/golang/content/go-doc@SoD0P5k4aSVRN96XxR5on.md +++ b/src/data/roadmaps/golang/content/go-doc@SoD0P5k4aSVRN96XxR5on.md @@ -1 +1,3 @@ -# go doc \ No newline at end of file +# go doc + +Prints documentation for Go packages, types, functions, and methods extracted from specially formatted comments. Use `go doc package` or `go doc package.Function` to view specific documentation. Essential for exploring APIs and verifying documentation formatting. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-fmt@CPFiclXXVQCsbooA0iCEy.md b/src/data/roadmaps/golang/content/go-fmt@CPFiclXXVQCsbooA0iCEy.md index 2c1014e65..23b2fd873 100644 --- a/src/data/roadmaps/golang/content/go-fmt@CPFiclXXVQCsbooA0iCEy.md +++ b/src/data/roadmaps/golang/content/go-fmt@CPFiclXXVQCsbooA0iCEy.md @@ -1 +1,3 @@ -# go fmt \ No newline at end of file +# go fmt + +The `go fmt` command automatically formats Go source code according to Go's official style guidelines. It standardizes indentation, spacing, alignment, and other formatting aspects to ensure consistent code style across all Go projects. The tool is opinionated and non-configurable, which eliminates debates about code formatting and ensures uniformity in the Go ecosystem. Most editors can be configured to run `go fmt` automatically on save. Using `go fmt` regularly keeps your code clean, readable, and consistent with Go community standards, making collaboration easier and code reviews more focused on logic rather than style. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-generate@TstTkc_-2RZMOqtSIklEM.md b/src/data/roadmaps/golang/content/go-generate@TstTkc_-2RZMOqtSIklEM.md index 482e07d31..d6f599738 100644 --- a/src/data/roadmaps/golang/content/go-generate@TstTkc_-2RZMOqtSIklEM.md +++ b/src/data/roadmaps/golang/content/go-generate@TstTkc_-2RZMOqtSIklEM.md @@ -1 +1,3 @@ -# go generate \ No newline at end of file +# go generate + +The `go generate` command executes commands specified in `//go:generate` directives to generate Go source code. Used for code generation from templates, string methods, embedded resources, and running tools like protobuf compilers for build automation. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-install@k35Ogbvr9yTdJPo4RV4tM.md b/src/data/roadmaps/golang/content/go-install@k35Ogbvr9yTdJPo4RV4tM.md index 4097c13e5..82eebd7b5 100644 --- a/src/data/roadmaps/golang/content/go-install@k35Ogbvr9yTdJPo4RV4tM.md +++ b/src/data/roadmaps/golang/content/go-install@k35Ogbvr9yTdJPo4RV4tM.md @@ -1 +1,3 @@ -# go install \ No newline at end of file +# go install + +Compiles and installs packages and dependencies. Creates executables in `$GOPATH/bin` for main packages. Use `go install package@version` to install specific versions of tools. Commonly used for installing CLI tools system-wide. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-mod-init@zWXJOXo8dRnuTvYlWOL6r.md b/src/data/roadmaps/golang/content/go-mod-init@zWXJOXo8dRnuTvYlWOL6r.md index 65ff30fa9..3f020543a 100644 --- a/src/data/roadmaps/golang/content/go-mod-init@zWXJOXo8dRnuTvYlWOL6r.md +++ b/src/data/roadmaps/golang/content/go-mod-init@zWXJOXo8dRnuTvYlWOL6r.md @@ -1 +1,3 @@ -# go mod init \ No newline at end of file +# go mod init + +Initializes new Go module by creating `go.mod` file with specified module path (typically repository URL). Marks directory as module root and enables module-based dependency management. First step for any new Go project. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-mod-tidy@6rwVq1bMSHoGatEfm9hkp.md b/src/data/roadmaps/golang/content/go-mod-tidy@6rwVq1bMSHoGatEfm9hkp.md index 5b0a72666..c1974778c 100644 --- a/src/data/roadmaps/golang/content/go-mod-tidy@6rwVq1bMSHoGatEfm9hkp.md +++ b/src/data/roadmaps/golang/content/go-mod-tidy@6rwVq1bMSHoGatEfm9hkp.md @@ -1 +1,3 @@ -# go mod tidy \ No newline at end of file +# go mod tidy + +Ensures `go.mod` matches source code by adding missing requirements and removing unused dependencies. Updates `go.sum` with checksums. Essential for maintaining clean dependency management and ensuring reproducible builds before production deployment. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-mod-vendor@jOiAk5coeDNVXP2QiwQis.md b/src/data/roadmaps/golang/content/go-mod-vendor@jOiAk5coeDNVXP2QiwQis.md index 706851cec..a9d5a4384 100644 --- a/src/data/roadmaps/golang/content/go-mod-vendor@jOiAk5coeDNVXP2QiwQis.md +++ b/src/data/roadmaps/golang/content/go-mod-vendor@jOiAk5coeDNVXP2QiwQis.md @@ -1 +1,3 @@ -# go mod vendor \ No newline at end of file +# go mod vendor + +Creates `vendor` directory with dependency copies for bundling with source code. Ensures builds work without internet access. Useful for deployment, air-gapped environments, and complete control over dependency availability. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-mod@5hnaPrYSBzxEIxFeg5tCK.md b/src/data/roadmaps/golang/content/go-mod@5hnaPrYSBzxEIxFeg5tCK.md index 259a3b04c..35279079c 100644 --- a/src/data/roadmaps/golang/content/go-mod@5hnaPrYSBzxEIxFeg5tCK.md +++ b/src/data/roadmaps/golang/content/go-mod@5hnaPrYSBzxEIxFeg5tCK.md @@ -1 +1,3 @@ -# go mod \ No newline at end of file +# go mod + +The `go mod` command is the primary tool for managing Go modules and dependencies. It provides subcommands for initializing modules (`init`), adding dependencies (`get`), removing unused dependencies (`tidy`), creating vendor directories (`vendor`), and verifying dependencies (`verify`). The command works with `go.mod` and `go.sum` files to track module requirements and ensure reproducible builds. Understanding `go mod` is essential for modern Go development, as it handles dependency management, version resolution, and module publishing. It replaced the older GOPATH-based workflow and is fundamental for building maintainable Go projects. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-run@rW4QPWIS2TWzFY0Ljny2N.md b/src/data/roadmaps/golang/content/go-run@rW4QPWIS2TWzFY0Ljny2N.md index a0e91e28d..4d57e2b50 100644 --- a/src/data/roadmaps/golang/content/go-run@rW4QPWIS2TWzFY0Ljny2N.md +++ b/src/data/roadmaps/golang/content/go-run@rW4QPWIS2TWzFY0Ljny2N.md @@ -1 +1,3 @@ -# go run \ No newline at end of file +# go run + +The `go run` command compiles and executes Go programs in a single step without creating a persistent binary file. It's perfect for development, testing small programs, and running scripts. When you use `go run main.go`, Go compiles the code to a temporary executable and runs it immediately, then cleans up the temporary files. This command is ideal for quick iterations during development, running one-off scripts, or testing code changes without the overhead of separate build steps. It accepts the same flags as `go build` and can run multiple files or entire packages. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-test@EskFmwCwOmZHcVzedPOJI.md b/src/data/roadmaps/golang/content/go-test@EskFmwCwOmZHcVzedPOJI.md index f5e48ff7d..3fb355121 100644 --- a/src/data/roadmaps/golang/content/go-test@EskFmwCwOmZHcVzedPOJI.md +++ b/src/data/roadmaps/golang/content/go-test@EskFmwCwOmZHcVzedPOJI.md @@ -1 +1,3 @@ -# go test \ No newline at end of file +# go test + +The `go test` command is Go's built-in tool for running tests, benchmarks, and examples. It automatically discovers test files (ending with `_test.go`), compiles them with the package code, and executes test functions. The command supports various flags for controlling test behavior, including `-v` for verbose output, `-run` for running specific tests, `-bench` for benchmarks, and `-cover` for coverage analysis. It can run tests in parallel, generate test coverage reports, and integrate with continuous integration systems. Mastering `go test` is crucial for maintaining code quality and implementing test-driven development practices. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-toolchain-and-tools@core-go-commands.md b/src/data/roadmaps/golang/content/go-toolchain-and-tools@core-go-commands.md new file mode 100644 index 000000000..fed152221 --- /dev/null +++ b/src/data/roadmaps/golang/content/go-toolchain-and-tools@core-go-commands.md @@ -0,0 +1,3 @@ +# Go Toolchain and Tools + +The Go toolchain provides comprehensive development tools through the unified `go` command. It includes the compiler, linker, and utilities for compilation, dependency management, testing, and profiling. This integrated approach simplifies Go development with seamless, consistent tooling. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-version@LnhQJVsEaS_gSijCUqAMq.md b/src/data/roadmaps/golang/content/go-version@LnhQJVsEaS_gSijCUqAMq.md index d57025d12..77951d34c 100644 --- a/src/data/roadmaps/golang/content/go-version@LnhQJVsEaS_gSijCUqAMq.md +++ b/src/data/roadmaps/golang/content/go-version@LnhQJVsEaS_gSijCUqAMq.md @@ -1 +1,3 @@ -# go version \ No newline at end of file +# go version + +Displays the currently installed Go version, target OS, and architecture. Essential for verifying installation, troubleshooting environment issues, and ensuring compatibility across different development environments and teams. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/go-vet@qoQ6_5MgTu3ur1mkEgqG5.md b/src/data/roadmaps/golang/content/go-vet@qoQ6_5MgTu3ur1mkEgqG5.md index 9e8347bda..c89baf55a 100644 --- a/src/data/roadmaps/golang/content/go-vet@qoQ6_5MgTu3ur1mkEgqG5.md +++ b/src/data/roadmaps/golang/content/go-vet@qoQ6_5MgTu3ur1mkEgqG5.md @@ -1 +1,3 @@ -# go vet \ No newline at end of file +# go vet + +Built-in tool analyzing Go source code for suspicious constructs likely to be bugs. Checks for unreachable code, incorrect printf formats, struct tag mistakes, and potential nil pointer dereferences. Automatically run by `go test`. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/goembed-for-embedding@iIPk-jK1vBCG_rKI_MPiu.md b/src/data/roadmaps/golang/content/goembed-for-embedding@iIPk-jK1vBCG_rKI_MPiu.md index fde8de669..36a407daa 100644 --- a/src/data/roadmaps/golang/content/goembed-for-embedding@iIPk-jK1vBCG_rKI_MPiu.md +++ b/src/data/roadmaps/golang/content/goembed-for-embedding@iIPk-jK1vBCG_rKI_MPiu.md @@ -1 +1,3 @@ -# go:embed for embedding \ No newline at end of file +# go:embed for embedding + +The `go:embed` directive embeds files and directories into Go binaries at compile time using `//go:embed` comments. Useful for including static assets, configs, and templates directly in executables, creating self-contained binaries that don't require external files. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/goimports@6RpfXYHnOGmM6pZ6ZBb29.md b/src/data/roadmaps/golang/content/goimports@6RpfXYHnOGmM6pZ6ZBb29.md index f8f9d3c34..28f7ec077 100644 --- a/src/data/roadmaps/golang/content/goimports@6RpfXYHnOGmM6pZ6ZBb29.md +++ b/src/data/roadmaps/golang/content/goimports@6RpfXYHnOGmM6pZ6ZBb29.md @@ -1 +1,3 @@ -# goimports \ No newline at end of file +# goimports + +Tool automatically managing Go import statements by adding missing imports and removing unused ones while formatting code. More convenient than manual import management, integrates with editors for automatic execution on save. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/golangci-lint@hgiNcGh3ggf8dBJ8C0HCL.md b/src/data/roadmaps/golang/content/golangci-lint@hgiNcGh3ggf8dBJ8C0HCL.md index 78122e510..b4af5e67d 100644 --- a/src/data/roadmaps/golang/content/golangci-lint@hgiNcGh3ggf8dBJ8C0HCL.md +++ b/src/data/roadmaps/golang/content/golangci-lint@hgiNcGh3ggf8dBJ8C0HCL.md @@ -1 +1,3 @@ -# golangci-lint \ No newline at end of file +# golangci-lint + +Fast, parallel runner for multiple Go linters including staticcheck, go vet, and revive. Provides unified configuration, output formatting, and performance optimization. Streamlines code quality workflows through a single comprehensive tool. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/gorm@fJdZIbAgOAB8nOEHQNsq6.md b/src/data/roadmaps/golang/content/gorm@fJdZIbAgOAB8nOEHQNsq6.md index e975a7458..f19cc5390 100644 --- a/src/data/roadmaps/golang/content/gorm@fJdZIbAgOAB8nOEHQNsq6.md +++ b/src/data/roadmaps/golang/content/gorm@fJdZIbAgOAB8nOEHQNsq6.md @@ -1 +1,3 @@ -# GORM \ No newline at end of file +# GORM + +GORM is a feature-rich Object-Relational Mapping (ORM) library for Go that simplifies database interactions. It provides an intuitive API for database operations, automatic migrations, associations (belongs to, has one, has many, many to many), hooks (before/after create/save/update/delete), transactions, and connection pooling. GORM supports multiple databases including PostgreSQL, MySQL, SQLite, and SQL Server. It includes advanced features like soft deletes, composite primary keys, database resolver for read/write splitting, and plugin system for extensibility. While ORMs add abstraction overhead, GORM is excellent for rapid development and complex data relationships. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/goroutines@08QOxnF3rKEDekrkX7w1j.md b/src/data/roadmaps/golang/content/goroutines@08QOxnF3rKEDekrkX7w1j.md index 33725778d..0e8eeff6f 100644 --- a/src/data/roadmaps/golang/content/goroutines@08QOxnF3rKEDekrkX7w1j.md +++ b/src/data/roadmaps/golang/content/goroutines@08QOxnF3rKEDekrkX7w1j.md @@ -1 +1,3 @@ -# Goroutines \ No newline at end of file +# Goroutines + +Goroutines are lightweight threads managed by the Go runtime that enable concurrent execution of functions. They are one of Go's most powerful features, allowing you to run thousands or even millions of concurrent operations with minimal memory overhead. Goroutines are created simply by prefixing a function call with the `go` keyword. The Go runtime automatically handles scheduling goroutines across available CPU cores, making concurrent programming much easier than traditional threading models. Goroutines communicate through channels and are fundamental to Go's approach to concurrency and parallelism. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/goto-discouraged@O29VoTfPiU8GZ_c16ZJIp.md b/src/data/roadmaps/golang/content/goto-discouraged@O29VoTfPiU8GZ_c16ZJIp.md index 3bb02ef54..1c09f453f 100644 --- a/src/data/roadmaps/golang/content/goto-discouraged@O29VoTfPiU8GZ_c16ZJIp.md +++ b/src/data/roadmaps/golang/content/goto-discouraged@O29VoTfPiU8GZ_c16ZJIp.md @@ -1 +1,3 @@ -# goto (discouraged) \ No newline at end of file +# goto (discouraged) + +The `goto` statement in Go allows jumping to labeled statements within the same function, but its use is strongly discouraged in modern Go programming. While goto exists for specific use cases like breaking out of nested loops or handling complex cleanup scenarios, it generally makes code harder to read, maintain, and debug. Go provides better alternatives like labeled break/continue statements, proper function decomposition, and structured control flow. Most situations where goto might seem necessary can be solved more elegantly with Go's other control structures. Understanding why goto is discouraged helps you write cleaner, more maintainable code that follows Go's philosophy of simplicity and clarity. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/govulncheck@K__satcG2ETNRFBpPqrLw.md b/src/data/roadmaps/golang/content/govulncheck@K__satcG2ETNRFBpPqrLw.md index 31e8a4944..11f62dace 100644 --- a/src/data/roadmaps/golang/content/govulncheck@K__satcG2ETNRFBpPqrLw.md +++ b/src/data/roadmaps/golang/content/govulncheck@K__satcG2ETNRFBpPqrLw.md @@ -1 +1,3 @@ -# govulncheck \ No newline at end of file +# govulncheck + +Go's official vulnerability scanner checking code and dependencies for known security vulnerabilities. Reports packages with vulnerabilities from Go database, provides severity info and remediation advice. Essential for maintaining secure applications. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/grpc--protocol-buffers@tBY6UB3gWZAxHPCFHoU_d.md b/src/data/roadmaps/golang/content/grpc--protocol-buffers@tBY6UB3gWZAxHPCFHoU_d.md index 9971960a2..fa790ca68 100644 --- a/src/data/roadmaps/golang/content/grpc--protocol-buffers@tBY6UB3gWZAxHPCFHoU_d.md +++ b/src/data/roadmaps/golang/content/grpc--protocol-buffers@tBY6UB3gWZAxHPCFHoU_d.md @@ -1 +1,3 @@ -# gRPC & Protocol Buffers \ No newline at end of file +# gRPC & Protocol Buffers + +gRPC is a high-performance RPC framework using Protocol Buffers for serialization. Provides streaming, authentication, load balancing, and code generation from `.proto` files. Excellent for microservices with type safety, efficient binary format, and cross-language compatibility. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/hello-world-in-go@PHHviBSqhYDSNuHBFbw3l.md b/src/data/roadmaps/golang/content/hello-world-in-go@PHHviBSqhYDSNuHBFbw3l.md index 6961b8f4e..508db1abf 100644 --- a/src/data/roadmaps/golang/content/hello-world-in-go@PHHviBSqhYDSNuHBFbw3l.md +++ b/src/data/roadmaps/golang/content/hello-world-in-go@PHHviBSqhYDSNuHBFbw3l.md @@ -1 +1,3 @@ -# Hello World in Go \ No newline at end of file +# Hello World in Go + +Traditional first program demonstrating basic structure: `package main`, importing `fmt`, and `main()` function using `fmt.Println()`. Teaches Go syntax, compilation, execution, and verifies development environment setup. Entry point for learning Go. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/history-of-go@2rlmLn_yQQV-7DpX1qT98.md b/src/data/roadmaps/golang/content/history-of-go@2rlmLn_yQQV-7DpX1qT98.md index 233d4cc3c..b8ab59465 100644 --- a/src/data/roadmaps/golang/content/history-of-go@2rlmLn_yQQV-7DpX1qT98.md +++ b/src/data/roadmaps/golang/content/history-of-go@2rlmLn_yQQV-7DpX1qT98.md @@ -1 +1,3 @@ -# History of Go \ No newline at end of file +# History of Go + +Created at Google in 2007 by Griesemer, Pike, and Thompson. Announced publicly in 2009, version 1.0 in 2012. Key milestones include modules (Go 1.11) and generics (Go 1.18). Designed for large-scale software development combining efficiency and simplicity. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/httptest--for-http-tests@Zt4FpqCEVlpMzclJeDiMs.md b/src/data/roadmaps/golang/content/httptest--for-http-tests@Zt4FpqCEVlpMzclJeDiMs.md index 70ecfc9c5..06d8825f3 100644 --- a/src/data/roadmaps/golang/content/httptest--for-http-tests@Zt4FpqCEVlpMzclJeDiMs.md +++ b/src/data/roadmaps/golang/content/httptest--for-http-tests@Zt4FpqCEVlpMzclJeDiMs.md @@ -1 +1,3 @@ -# `httptest` for HTTP Tests \ No newline at end of file +# `httptest` for HTTP Tests + +The `httptest` package provides utilities for testing HTTP servers and clients without network connections. Includes `httptest.Server`, `ResponseRecorder`, and helpers for creating test requests. Essential for testing handlers, middleware, and HTTP services. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/if-else@2XaDvTJ5pyChgt1GFZF8W.md b/src/data/roadmaps/golang/content/if-else@2XaDvTJ5pyChgt1GFZF8W.md index 7245d4907..ebd35f979 100644 --- a/src/data/roadmaps/golang/content/if-else@2XaDvTJ5pyChgt1GFZF8W.md +++ b/src/data/roadmaps/golang/content/if-else@2XaDvTJ5pyChgt1GFZF8W.md @@ -1 +1,3 @@ -# if-else \ No newline at end of file +# if-else + +The if-else statement in Go extends the basic if statement by providing an alternative code path when the condition is false. You can chain multiple conditions using else if to handle complex decision logic. Go's if-else maintains the same syntax rules as if statements - no parentheses required around conditions, but braces are mandatory around bodies. The else clause must be on the same line as the closing brace of the if block. If-else statements are essential for binary decisions, error handling patterns, and implementing branching logic where you need to choose between different execution paths based on conditions. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/if@dC-1LotbW29C4zZJv6ak6.md b/src/data/roadmaps/golang/content/if@dC-1LotbW29C4zZJv6ak6.md index 628c54b08..d3eb2fefd 100644 --- a/src/data/roadmaps/golang/content/if@dC-1LotbW29C4zZJv6ak6.md +++ b/src/data/roadmaps/golang/content/if@dC-1LotbW29C4zZJv6ak6.md @@ -1 +1,3 @@ -# if \ No newline at end of file +# if + +The if statement in Go provides conditional execution of code blocks based on boolean expressions. Go's if statements don't require parentheses around conditions but must have braces around the body, even for single statements. A unique feature is the ability to include an initialization statement before the condition, which is useful for declaring variables with limited scope. If statements can be chained with else if and else clauses to handle multiple conditions. They're fundamental for controlling program flow, implementing business logic, and making decisions based on runtime conditions. Understanding if statements is essential for any Go program with conditional behavior. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/integers-signed-unsigned@EAqL8Up3J63AWCZnqQph0.md b/src/data/roadmaps/golang/content/integers-signed-unsigned@EAqL8Up3J63AWCZnqQph0.md index cf5a93e7e..3c038eaa1 100644 --- a/src/data/roadmaps/golang/content/integers-signed-unsigned@EAqL8Up3J63AWCZnqQph0.md +++ b/src/data/roadmaps/golang/content/integers-signed-unsigned@EAqL8Up3J63AWCZnqQph0.md @@ -1 +1,3 @@ -# Integers (Signed, Unsigned) \ No newline at end of file +# Integers (Signed, Unsigned) + +Signed integers (int8, int16, int32, int64) handle positive/negative numbers. Unsigned (uint8, uint16, uint32, uint64) handle only non-negative but larger positive range. `int`/`uint` are platform-dependent. Choose based on range and memory needs. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/interfaces-basics@nkONsPlFYCMqzWHTm_EPB.md b/src/data/roadmaps/golang/content/interfaces-basics@nkONsPlFYCMqzWHTm_EPB.md index 414805a63..25e2c6228 100644 --- a/src/data/roadmaps/golang/content/interfaces-basics@nkONsPlFYCMqzWHTm_EPB.md +++ b/src/data/roadmaps/golang/content/interfaces-basics@nkONsPlFYCMqzWHTm_EPB.md @@ -1 +1,3 @@ -# Interfaces Basics \ No newline at end of file +# Interfaces Basics + +Define contracts through method signatures. Types automatically satisfy interfaces by implementing required methods. Declared with `type InterfaceName interface{}` syntax. Enable polymorphism and flexible, testable code depending on behavior rather than concrete types. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/interfaces@hIRMnPyHRGh8xCU8BTS2n.md b/src/data/roadmaps/golang/content/interfaces@hIRMnPyHRGh8xCU8BTS2n.md index ae1d147ef..929ed83c1 100644 --- a/src/data/roadmaps/golang/content/interfaces@hIRMnPyHRGh8xCU8BTS2n.md +++ b/src/data/roadmaps/golang/content/interfaces@hIRMnPyHRGh8xCU8BTS2n.md @@ -1 +1,3 @@ -# Interfaces \ No newline at end of file +# Interfaces + +Interfaces in Go define a contract by specifying a set of method signatures that a type must implement. Unlike many other languages, Go interfaces are implemented implicitly - a type implements an interface simply by implementing all the methods declared in the interface. This approach promotes loose coupling and makes code more flexible and testable. Interfaces are central to Go's type system and enable polymorphism, allowing different types to be used interchangeably as long as they satisfy the same interface. They are essential for writing modular, extensible Go programs. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/interpreted-string-literals@7h08RUNC_uAMI6vnGdcZ1.md b/src/data/roadmaps/golang/content/interpreted-string-literals@7h08RUNC_uAMI6vnGdcZ1.md index bd4e742bb..9e4317cf2 100644 --- a/src/data/roadmaps/golang/content/interpreted-string-literals@7h08RUNC_uAMI6vnGdcZ1.md +++ b/src/data/roadmaps/golang/content/interpreted-string-literals@7h08RUNC_uAMI6vnGdcZ1.md @@ -1 +1,3 @@ -# Interpreted String Literals \ No newline at end of file +# Interpreted String Literals + +Enclosed in double quotes (`"`) and process escape sequences like `\n`, `\t`, `\"`. Support Unicode characters and formatting. Most common string type, ideal for text needing control characters but requiring escaping of special characters. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/introduction-to-go@WwLLyHL5psm0GOI9bmOne.md b/src/data/roadmaps/golang/content/introduction-to-go@WwLLyHL5psm0GOI9bmOne.md index 3b99e3b68..7f0377471 100644 --- a/src/data/roadmaps/golang/content/introduction-to-go@WwLLyHL5psm0GOI9bmOne.md +++ b/src/data/roadmaps/golang/content/introduction-to-go@WwLLyHL5psm0GOI9bmOne.md @@ -1 +1,3 @@ -# Introduction to Go \ No newline at end of file +# Introduction to Go + +Go (also known as Golang) is a statically typed, compiled programming language developed by Google in 2007 and released in 2009. Created by Robert Griesemer, Rob Pike, and Ken Thompson, Go was designed to address the challenges of large-scale software development at Google. It combines the efficiency and safety of statically typed languages with the ease of programming of dynamically typed languages. Go emphasizes simplicity, readability, and efficiency, making it ideal for building scalable web services, cloud applications, and system tools. Its key features include fast compilation, garbage collection, built-in concurrency support, and a comprehensive standard library. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/io--file-handling@7SYEXD5r9WKEDfecQdO5d.md b/src/data/roadmaps/golang/content/io--file-handling@7SYEXD5r9WKEDfecQdO5d.md index ed771fe01..e4c31de58 100644 --- a/src/data/roadmaps/golang/content/io--file-handling@7SYEXD5r9WKEDfecQdO5d.md +++ b/src/data/roadmaps/golang/content/io--file-handling@7SYEXD5r9WKEDfecQdO5d.md @@ -1 +1,3 @@ -# I/O & File Handling \ No newline at end of file +# I/O & File Handling + +Go's I/O system provides comprehensive file and stream handling through `io` package interfaces (Reader, Writer, Closer) and `os` package file operations. The interface-based design allows working with files, network connections, and buffers using consistent patterns. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/iterating-maps@Q6ic-AGG_gnXEOdmqom89.md b/src/data/roadmaps/golang/content/iterating-maps@Q6ic-AGG_gnXEOdmqom89.md index c6f541430..92a91a00e 100644 --- a/src/data/roadmaps/golang/content/iterating-maps@Q6ic-AGG_gnXEOdmqom89.md +++ b/src/data/roadmaps/golang/content/iterating-maps@Q6ic-AGG_gnXEOdmqom89.md @@ -1 +1,3 @@ -# Iterating Maps \ No newline at end of file +# Iterating Maps + +Iterating over maps in Go is done using the `for range` loop, which provides access to both keys and values. The iteration order is not guaranteed and can vary between runs, making maps unsuitable when order matters. You can iterate over keys only, values only, or both depending on your needs. Common patterns include checking if keys exist, building new collections from map data, and processing key-value pairs. When you need ordered iteration, you typically collect keys in a slice, sort them, and then iterate through the sorted keys to access map values in order. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/iterating-strings@PC-azlCZ6wDCn1_nRyhUn.md b/src/data/roadmaps/golang/content/iterating-strings@PC-azlCZ6wDCn1_nRyhUn.md index 67eadd3b8..2d65abe73 100644 --- a/src/data/roadmaps/golang/content/iterating-strings@PC-azlCZ6wDCn1_nRyhUn.md +++ b/src/data/roadmaps/golang/content/iterating-strings@PC-azlCZ6wDCn1_nRyhUn.md @@ -1 +1,3 @@ -# Iterating Strings \ No newline at end of file +# Iterating Strings + +Iterating over strings in Go using `for range` automatically handles UTF-8 decoding and provides Unicode code points (runes) rather than individual bytes. This is important for properly handling international characters and emojis. The loop gives you the byte index and the rune value at each position. If you need to work with individual bytes instead of runes, you can convert the string to a byte slice first. Understanding string iteration is crucial for text processing, validation, and building applications that work correctly with international text and various character encodings. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/json@uB1fE15OprBcwN7p7ffJF.md b/src/data/roadmaps/golang/content/json@uB1fE15OprBcwN7p7ffJF.md new file mode 100644 index 000000000..4182805eb --- /dev/null +++ b/src/data/roadmaps/golang/content/json@uB1fE15OprBcwN7p7ffJF.md @@ -0,0 +1,3 @@ +# encoding/json + +The `encoding/json` package provides functionality for encoding and decoding JSON data, which is essential for modern web APIs and data interchange. It can marshal Go values to JSON and unmarshal JSON to Go values automatically using reflection. The package supports struct tags for field customization, custom marshaling/unmarshaling through interfaces, and handles various data types including maps, slices, and nested structures. Understanding JSON encoding is crucial for building web services, consuming APIs, and working with configuration files. The package is optimized for performance and provides flexible options for handling different JSON formats and requirements. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/linters@static-analysis.md b/src/data/roadmaps/golang/content/linters@static-analysis.md new file mode 100644 index 000000000..3001b67d2 --- /dev/null +++ b/src/data/roadmaps/golang/content/linters@static-analysis.md @@ -0,0 +1,3 @@ +# Linters + +Static analysis tools examining source code for errors, style violations, and quality issues without execution. Popular tools include revive, staticcheck, and golangci-lint. Integrate into editors and CI/CD pipelines to catch issues early and maintain consistent code standards. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/logging@mGia5cJ7HFVXM0Fx5xhQE.md b/src/data/roadmaps/golang/content/logging@mGia5cJ7HFVXM0Fx5xhQE.md index 85f805b3b..32491c136 100644 --- a/src/data/roadmaps/golang/content/logging@mGia5cJ7HFVXM0Fx5xhQE.md +++ b/src/data/roadmaps/golang/content/logging@mGia5cJ7HFVXM0Fx5xhQE.md @@ -1 +1,3 @@ -# Logging \ No newline at end of file +# Logging + +Logging is essential for monitoring, debugging, and maintaining Go applications in production. Go's standard library includes a basic `log` package, and Go 1.21 introduced the structured `slog` package for more advanced logging needs. Popular third-party logging libraries include Zap (high-performance), Zerolog (zero-allocation), and Logrus (feature-rich). Effective logging involves choosing appropriate log levels (debug, info, warn, error), structuring log messages for easy parsing, and configuring outputs for different environments. Good logging practices help with troubleshooting issues, monitoring application behavior, and maintaining system health. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/loops@orpxzKHFcf1BDQSefHl6O.md b/src/data/roadmaps/golang/content/loops@orpxzKHFcf1BDQSefHl6O.md index d31a16aa6..af8a7c694 100644 --- a/src/data/roadmaps/golang/content/loops@orpxzKHFcf1BDQSefHl6O.md +++ b/src/data/roadmaps/golang/content/loops@orpxzKHFcf1BDQSefHl6O.md @@ -1 +1,3 @@ -# Loops \ No newline at end of file +# Loops + +Go has only one looping construct: the `for` loop, but it's flexible enough to handle all looping scenarios. The basic `for` loop has three components: initialization, condition, and post statement. Go also supports `for range` loops for iterating over arrays, slices, maps, strings, and channels. You can create infinite loops by omitting conditions, and while-style loops by omitting initialization and post statements. Loop control statements like `break` and `continue` provide additional flow control. The simplicity of having just one loop construct makes Go code more consistent and easier to read. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/make@PWrfmYnOJRlwgdFat91bC.md b/src/data/roadmaps/golang/content/make@PWrfmYnOJRlwgdFat91bC.md index 84129df4b..4d0d2b441 100644 --- a/src/data/roadmaps/golang/content/make@PWrfmYnOJRlwgdFat91bC.md +++ b/src/data/roadmaps/golang/content/make@PWrfmYnOJRlwgdFat91bC.md @@ -1 +1,3 @@ -# make() \ No newline at end of file +# make() + +Creates and initializes slices, maps, and channels. Unlike `new()`, returns usable values. Examples: `make([]int, 5, 10)` for slices, `make(map[string]int)` for maps, `make(chan int)` for channels. Essential for initializing reference types. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/maps@XupDuVRsM5VjdaNs7JaT5.md b/src/data/roadmaps/golang/content/maps@XupDuVRsM5VjdaNs7JaT5.md index e04b629b3..ffe7a805a 100644 --- a/src/data/roadmaps/golang/content/maps@XupDuVRsM5VjdaNs7JaT5.md +++ b/src/data/roadmaps/golang/content/maps@XupDuVRsM5VjdaNs7JaT5.md @@ -1 +1,3 @@ -# Maps \ No newline at end of file +# Maps + +Maps in Go are built-in data structures that store key-value pairs, similar to hash tables or dictionaries in other languages. They provide fast lookups, insertions, and deletions based on unique keys. Maps are reference types and must be initialized before use, either with `make(map[KeyType]ValueType)` or with map literals. Keys must be comparable types (strings, numbers, booleans, arrays, structs with comparable fields), while values can be any type. Maps are essential for many programming tasks including caching, counting, grouping data, and implementing lookup tables. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/melody@N0EG-7sU9lGFwgidXuPkV.md b/src/data/roadmaps/golang/content/melody@N0EG-7sU9lGFwgidXuPkV.md index 99e1476c7..70622f33c 100644 --- a/src/data/roadmaps/golang/content/melody@N0EG-7sU9lGFwgidXuPkV.md +++ b/src/data/roadmaps/golang/content/melody@N0EG-7sU9lGFwgidXuPkV.md @@ -1 +1,3 @@ -# Melody \ No newline at end of file +# Melody + +Melody is a minimalist WebSocket framework for Go providing simple session management, message broadcasting, and connection handling. Features include rooms, automatic ping/pong, message limits, and clean integration with existing web frameworks for real-time apps. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/memory-management@ItMgLOzaUCCdiTk221pAF.md b/src/data/roadmaps/golang/content/memory-management@ItMgLOzaUCCdiTk221pAF.md index 0f0ebe5f9..887e8d43f 100644 --- a/src/data/roadmaps/golang/content/memory-management@ItMgLOzaUCCdiTk221pAF.md +++ b/src/data/roadmaps/golang/content/memory-management@ItMgLOzaUCCdiTk221pAF.md @@ -1 +1,3 @@ -# Memory Management \ No newline at end of file +# Memory Management + +Largely automatic through garbage collection. Runtime decides stack (fast, auto-cleaned) vs heap (slower, GC required) allocation via escape analysis. Understanding allocation patterns and avoiding memory leaks helps write efficient, scalable Go programs. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/memory-mgmt-in-depth@_2JpTdzmXxszFCauJONCi.md b/src/data/roadmaps/golang/content/memory-mgmt-in-depth@_2JpTdzmXxszFCauJONCi.md index eecdf3b44..965d56c9a 100644 --- a/src/data/roadmaps/golang/content/memory-mgmt-in-depth@_2JpTdzmXxszFCauJONCi.md +++ b/src/data/roadmaps/golang/content/memory-mgmt-in-depth@_2JpTdzmXxszFCauJONCi.md @@ -1 +1,3 @@ -# Memory Mgmt. in Depth \ No newline at end of file +# Memory Mgmt. in Depth + +Deep memory management involves understanding garbage collection, escape analysis, allocation patterns, and optimization techniques. Covers stack vs heap allocation, memory pooling, reducing allocations, and GC interaction for high-performance applications. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/methods-vs-functions@jx1vln8hqRJqVZfJi6CST.md b/src/data/roadmaps/golang/content/methods-vs-functions@jx1vln8hqRJqVZfJi6CST.md index 1f17029d3..de3ac7e81 100644 --- a/src/data/roadmaps/golang/content/methods-vs-functions@jx1vln8hqRJqVZfJi6CST.md +++ b/src/data/roadmaps/golang/content/methods-vs-functions@jx1vln8hqRJqVZfJi6CST.md @@ -1 +1,3 @@ -# Methods vs Functions \ No newline at end of file +# Methods vs Functions + +In Go, functions are standalone code blocks that can be called independently, while methods are functions associated with a specific type (called a receiver). Methods are defined by adding a receiver parameter between the `func` keyword and the method name. This allows you to call the method on instances of that type using dot notation. Methods enable object-oriented programming patterns in Go, allowing types to have behavior associated with them. Understanding the distinction between methods and functions is crucial for designing clean, maintainable Go code that follows idiomatic patterns. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/mocks-and-stubs@LjLbm4JEZ19howOkju7zQ.md b/src/data/roadmaps/golang/content/mocks-and-stubs@LjLbm4JEZ19howOkju7zQ.md index e7f94d8c5..3844695ba 100644 --- a/src/data/roadmaps/golang/content/mocks-and-stubs@LjLbm4JEZ19howOkju7zQ.md +++ b/src/data/roadmaps/golang/content/mocks-and-stubs@LjLbm4JEZ19howOkju7zQ.md @@ -1 +1,3 @@ -# Mocks and Stubs \ No newline at end of file +# Mocks and Stubs + +Mocks and stubs replace dependencies with controlled implementations for isolated testing. Stubs provide predefined responses while mocks verify method calls. Go's interfaces make mocking natural. Essential for testing without external dependencies. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/modules--dependencies@kep_536v13aS1V9XwHKSr.md b/src/data/roadmaps/golang/content/modules--dependencies@kep_536v13aS1V9XwHKSr.md index 4ce78f86b..b028d62aa 100644 --- a/src/data/roadmaps/golang/content/modules--dependencies@kep_536v13aS1V9XwHKSr.md +++ b/src/data/roadmaps/golang/content/modules--dependencies@kep_536v13aS1V9XwHKSr.md @@ -1 +1,3 @@ -# Modules & Dependencies \ No newline at end of file +# Modules & Dependencies + +Go modules are the standard way to manage dependencies in Go projects. A module is a collection of related Go packages stored together with go.mod and go.sum files that track dependencies and their versions. Modules enable reproducible builds, version management, and dependency resolution. The `go.mod` file defines the module path and lists dependencies, while `go.sum` contains checksums for security. Modules replaced the older GOPATH-based approach and are essential for building reliable, maintainable Go applications that depend on external libraries and packages. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/multiple-return-values@ai2s1bwiTcPzrXQTxFDwV.md b/src/data/roadmaps/golang/content/multiple-return-values@ai2s1bwiTcPzrXQTxFDwV.md index bf070fc96..e46f56b75 100644 --- a/src/data/roadmaps/golang/content/multiple-return-values@ai2s1bwiTcPzrXQTxFDwV.md +++ b/src/data/roadmaps/golang/content/multiple-return-values@ai2s1bwiTcPzrXQTxFDwV.md @@ -1 +1,3 @@ -# Multiple Return Values \ No newline at end of file +# Multiple Return Values + +Go functions can return multiple values, which is commonly used for returning both a result and an error. This pattern eliminates the need for exceptions and makes error handling explicit and visible in the code flow. Functions can return any number of values of different types, and callers can capture all values or ignore some using the blank identifier `_`. Multiple return values are essential for Go's error handling idiom, make functions more expressive, and reduce the need for complex data structures just to return multiple pieces of information. This feature contributes to Go's clean, readable code style and explicit error handling philosophy. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/mutexes@6ydgmac11Zu9Ithe0kKj9.md b/src/data/roadmaps/golang/content/mutexes@6ydgmac11Zu9Ithe0kKj9.md index 46e19fd94..98f40ce2c 100644 --- a/src/data/roadmaps/golang/content/mutexes@6ydgmac11Zu9Ithe0kKj9.md +++ b/src/data/roadmaps/golang/content/mutexes@6ydgmac11Zu9Ithe0kKj9.md @@ -1 +1,3 @@ -# Mutexes \ No newline at end of file +# Mutexes + +Mutexes (mutual exclusion locks) in Go's sync package provide a way to protect shared resources from concurrent access, preventing race conditions. A mutex ensures that only one goroutine can access a protected section of code at a time. Go provides `sync.Mutex` for exclusive access and `sync.RWMutex` for scenarios where you want to allow multiple concurrent readers but exclusive writers. Mutexes should be used sparingly in Go, as channels are often a better choice for communication between goroutines. However, mutexes are essential for protecting shared state that doesn't fit the channel communication model, such as caches, counters, or complex data structures. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/named-return-values@HIvwT8Dcr6B2NjOjy9hFv.md b/src/data/roadmaps/golang/content/named-return-values@HIvwT8Dcr6B2NjOjy9hFv.md index a2fb03e8d..ad4a85e59 100644 --- a/src/data/roadmaps/golang/content/named-return-values@HIvwT8Dcr6B2NjOjy9hFv.md +++ b/src/data/roadmaps/golang/content/named-return-values@HIvwT8Dcr6B2NjOjy9hFv.md @@ -1 +1,3 @@ -# Named Return Values \ No newline at end of file +# Named Return Values + +Named return values in Go allow you to specify names for return parameters in the function signature, creating variables that are automatically initialized to zero values and returned when the function ends. Using named returns can make code more readable by documenting what each return value represents, simplify complex functions with multiple return statements, and enable "naked" returns (just `return` without specifying values). However, they should be used judiciously as they can sometimes reduce clarity, especially in short functions. Named returns are most beneficial in longer functions where the return values' purpose might not be immediately clear from context. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/nethttp-standard@NMLmbKjfMSqz-Iz2CooCl.md b/src/data/roadmaps/golang/content/nethttp-standard@NMLmbKjfMSqz-Iz2CooCl.md index b7fea5890..a594fda77 100644 --- a/src/data/roadmaps/golang/content/nethttp-standard@NMLmbKjfMSqz-Iz2CooCl.md +++ b/src/data/roadmaps/golang/content/nethttp-standard@NMLmbKjfMSqz-Iz2CooCl.md @@ -1 +1,3 @@ -# net/http (standard) \ No newline at end of file +# net/http (standard) + +The `net/http` package is Go's powerful standard library for building HTTP clients and servers without external dependencies. It provides everything needed to create web servers, make HTTP requests, handle routing, process form data, manage cookies, and implement middleware. The package includes types like `http.Server`, `http.Client`, `http.Request`, and `http.Response` for comprehensive HTTP functionality. You can build production-ready web applications using only the standard library, though many developers choose frameworks for additional convenience. Understanding `net/http` is fundamental for Go web development and provides the foundation that most Go web frameworks build upon. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/orms--db-access@VcHHuIZ4lGzTxOoTwxA3e.md b/src/data/roadmaps/golang/content/orms--db-access@VcHHuIZ4lGzTxOoTwxA3e.md index 3bb7c9713..5f79d2e81 100644 --- a/src/data/roadmaps/golang/content/orms--db-access@VcHHuIZ4lGzTxOoTwxA3e.md +++ b/src/data/roadmaps/golang/content/orms--db-access@VcHHuIZ4lGzTxOoTwxA3e.md @@ -1 +1,3 @@ -# ORMs & DB Access \ No newline at end of file +# ORMs & DB Access + +Go provides several approaches for database access, ranging from low-level database drivers to full-featured Object-Relational Mapping (ORM) libraries. The standard `database/sql` package offers a consistent interface for working with SQL databases, while libraries like GORM provide higher-level ORM functionality and pgx offers PostgreSQL-specific optimizations. ORMs can simplify database operations by mapping database records to Go structs, handling relationships, and providing query builders. However, they may introduce overhead, so choosing between raw SQL, lightweight query builders, or full ORMs depends on your application's complexity and performance requirements. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/os@9S1gkzBvt32uLy0IFZjrg.md b/src/data/roadmaps/golang/content/os@9S1gkzBvt32uLy0IFZjrg.md index 6b44c9356..64f51adc9 100644 --- a/src/data/roadmaps/golang/content/os@9S1gkzBvt32uLy0IFZjrg.md +++ b/src/data/roadmaps/golang/content/os@9S1gkzBvt32uLy0IFZjrg.md @@ -1 +1,3 @@ -# os \ No newline at end of file +# os + +The `os` package provides a platform-independent interface to operating system functionality including file operations, environment variables, process management, and system information. It includes functions for creating, reading, writing, and deleting files and directories, working with file permissions, and executing system commands. The package also provides access to command-line arguments, environment variables, and process signals. Understanding the `os` package is fundamental for building system tools, CLI applications, and any program that needs to interact with the file system or operating system services. It's essential for creating portable applications that work across different operating systems. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/package-import-rules@dA8SMhCev1NWNM1Tsxu57.md b/src/data/roadmaps/golang/content/package-import-rules@dA8SMhCev1NWNM1Tsxu57.md index 922f28ca2..d7272397a 100644 --- a/src/data/roadmaps/golang/content/package-import-rules@dA8SMhCev1NWNM1Tsxu57.md +++ b/src/data/roadmaps/golang/content/package-import-rules@dA8SMhCev1NWNM1Tsxu57.md @@ -1 +1,3 @@ -# Package Import Rules \ No newline at end of file +# Package Import Rules + +Key rules: no circular imports, main package for executables, lowercase package names, exported identifiers start with capitals. Import paths are unique identifiers. Understanding ensures proper structure and follows Go conventions. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/packages@AcYzrGFrwmeVYFEfhEiSZ.md b/src/data/roadmaps/golang/content/packages@AcYzrGFrwmeVYFEfhEiSZ.md index 9dcad6f26..e922438a1 100644 --- a/src/data/roadmaps/golang/content/packages@AcYzrGFrwmeVYFEfhEiSZ.md +++ b/src/data/roadmaps/golang/content/packages@AcYzrGFrwmeVYFEfhEiSZ.md @@ -1 +1,3 @@ -# Packages \ No newline at end of file +# Packages + +Packages are Go's way of organizing and reusing code. Every Go program is made up of packages, with the main package being the entry point for executable programs. Packages group related functionality together and provide a namespace for code organization. Each package has a unique import path that identifies it, and you can import other packages to use their exported functions, types, and variables. Package names should be short, clear, and lowercase. Understanding packages is essential for structuring larger Go applications, creating reusable libraries, and collaborating with other developers through shared code. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/panic-and-recover@2KyzUjcMiMgo_AvlPjYbx.md b/src/data/roadmaps/golang/content/panic-and-recover@2KyzUjcMiMgo_AvlPjYbx.md index 777b8697f..f92fed982 100644 --- a/src/data/roadmaps/golang/content/panic-and-recover@2KyzUjcMiMgo_AvlPjYbx.md +++ b/src/data/roadmaps/golang/content/panic-and-recover@2KyzUjcMiMgo_AvlPjYbx.md @@ -1 +1,3 @@ -# `panic` and `recover` \ No newline at end of file +# `panic` and `recover` + +`panic()` stops execution and unwinds stack, `recover()` catches panics in deferred functions. Use sparingly for unrecoverable errors. While Go emphasizes explicit errors, panic/recover serve as safety net for exceptional situations. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/performance-and-debugging@profiling-tools.md b/src/data/roadmaps/golang/content/performance-and-debugging@profiling-tools.md new file mode 100644 index 000000000..b8b2ff747 --- /dev/null +++ b/src/data/roadmaps/golang/content/performance-and-debugging@profiling-tools.md @@ -0,0 +1,3 @@ +# Performance and Debugging + +Go provides powerful debugging and profiling tools including pprof for CPU/memory analysis, trace for execution analysis, and race detector for concurrency issues. These tools help identify bottlenecks, optimize performance, and debug complex problems in production applications. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/pgx@cOj6klfBzTQQ8G75umLQZ.md b/src/data/roadmaps/golang/content/pgx@cOj6klfBzTQQ8G75umLQZ.md index ffa43432c..ca2f9fd14 100644 --- a/src/data/roadmaps/golang/content/pgx@cOj6klfBzTQQ8G75umLQZ.md +++ b/src/data/roadmaps/golang/content/pgx@cOj6klfBzTQQ8G75umLQZ.md @@ -1 +1,3 @@ -# pgx \ No newline at end of file +# pgx + +pgx is a pure Go PostgreSQL driver providing both database/sql compatibility and native PostgreSQL features. Offers better performance than lib/pq, includes arrays, JSON support, connection pooling, and PostgreSQL-specific features like LISTEN/NOTIFY. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/pipeline@loozcCzPzkni7BOdcvt1S.md b/src/data/roadmaps/golang/content/pipeline@loozcCzPzkni7BOdcvt1S.md index af16dddc9..10859b7a0 100644 --- a/src/data/roadmaps/golang/content/pipeline@loozcCzPzkni7BOdcvt1S.md +++ b/src/data/roadmaps/golang/content/pipeline@loozcCzPzkni7BOdcvt1S.md @@ -1 +1,3 @@ -# pipeline \ No newline at end of file +# pipeline + +The pipeline pattern in Go connects multiple stages of processing where each stage runs concurrently and communicates through channels. Data flows from one stage to the next, with each stage performing a specific transformation or operation. Pipelines enable efficient streaming processing, memory efficiency (since you don't need to store all data at once), and natural parallelism. Each stage can run at its own pace, with channels providing buffering between stages. This pattern is excellent for data processing workflows, stream processing, and any scenario where you can break down complex operations into sequential, composable steps. Pipelines promote clean, modular code that's easy to test and reason about. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/plugins--dynamic-loading@NlkrCAdUCJ7kU9meQJM5_.md b/src/data/roadmaps/golang/content/plugins--dynamic-loading@NlkrCAdUCJ7kU9meQJM5_.md index 8e8f457e0..065f732d0 100644 --- a/src/data/roadmaps/golang/content/plugins--dynamic-loading@NlkrCAdUCJ7kU9meQJM5_.md +++ b/src/data/roadmaps/golang/content/plugins--dynamic-loading@NlkrCAdUCJ7kU9meQJM5_.md @@ -1 +1,3 @@ -# Plugins & Dynamic Loading \ No newline at end of file +# Plugins & Dynamic Loading + +Go's plugin system allows loading shared libraries (.so files) at runtime using the `plugin` package. Built with `go build -buildmode=plugin`. Enables modular architectures but has limitations: Unix-only, version compatibility issues, and complexity. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/pointer-receivers@6NKgb-OjGdT3QsMrDU05b.md b/src/data/roadmaps/golang/content/pointer-receivers@6NKgb-OjGdT3QsMrDU05b.md index 3a14d64e7..bf41b6650 100644 --- a/src/data/roadmaps/golang/content/pointer-receivers@6NKgb-OjGdT3QsMrDU05b.md +++ b/src/data/roadmaps/golang/content/pointer-receivers@6NKgb-OjGdT3QsMrDU05b.md @@ -1 +1,3 @@ -# Pointer Receivers \ No newline at end of file +# Pointer Receivers + +Methods receive pointer to struct rather than copy using `func (p *Type) methodName()` syntax. Necessary when method modifies receiver state or struct is large. Go automatically handles value/pointer conversion when calling methods. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/pointers-basics@P0fUxEbb3bVYg35VWyg8R.md b/src/data/roadmaps/golang/content/pointers-basics@P0fUxEbb3bVYg35VWyg8R.md index 6f5bb5e58..7bbc5ac09 100644 --- a/src/data/roadmaps/golang/content/pointers-basics@P0fUxEbb3bVYg35VWyg8R.md +++ b/src/data/roadmaps/golang/content/pointers-basics@P0fUxEbb3bVYg35VWyg8R.md @@ -1 +1,3 @@ -# Pointers Basics \ No newline at end of file +# Pointers Basics + +Pointer basics in Go involve understanding how to declare, initialize, and use pointers to store memory addresses. A pointer is declared with `*Type` and you get a pointer to a variable using the address operator `&`. To access the value at a pointer's address, you use the dereference operator `*`. Pointers enable efficient passing of large data structures, allow functions to modify original values, and are essential for dynamic memory allocation. Unlike C, Go pointers don't support arithmetic operations, making them safer. Understanding pointer basics is crucial for efficient memory usage and implementing data structures like linked lists and trees. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/pointers-with-structs@NfYlEY8f_YPITT6Exp3Iw.md b/src/data/roadmaps/golang/content/pointers-with-structs@NfYlEY8f_YPITT6Exp3Iw.md index e26213a65..425e1d160 100644 --- a/src/data/roadmaps/golang/content/pointers-with-structs@NfYlEY8f_YPITT6Exp3Iw.md +++ b/src/data/roadmaps/golang/content/pointers-with-structs@NfYlEY8f_YPITT6Exp3Iw.md @@ -1 +1,3 @@ -# Pointers with Structs \ No newline at end of file +# Pointers with Structs + +Pointers with structs in Go are commonly used to avoid copying large structures and to enable methods to modify struct values. When you have a pointer to a struct, Go provides automatic dereferencing, so you can access fields using dot notation directly (`ptr.field` instead of `(*ptr).field`). Struct pointers are essential for implementing methods that modify the receiver, sharing structs between functions efficiently, and building data structures where structs need to reference each other. Methods can have either value receivers or pointer receivers, with pointer receivers being necessary when the method needs to modify the struct or when the struct is large and copying would be expensive. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/pointers@naBjKGrTBzlpapXzLHfvG.md b/src/data/roadmaps/golang/content/pointers@naBjKGrTBzlpapXzLHfvG.md index 40c113ec1..fc8a59194 100644 --- a/src/data/roadmaps/golang/content/pointers@naBjKGrTBzlpapXzLHfvG.md +++ b/src/data/roadmaps/golang/content/pointers@naBjKGrTBzlpapXzLHfvG.md @@ -1 +1,3 @@ -# Pointers \ No newline at end of file +# Pointers + +Pointers in Go store the memory address of a variable rather than the value itself. They are declared using the `*` operator and you can get the address of a variable using the `&` operator. Pointers allow you to directly modify values in memory, share large data structures efficiently without copying, and enable functions to modify variables passed as arguments. While Go pointers are safer than those in languages like C (no pointer arithmetic), they are essential for understanding how Go manages memory and for writing efficient programs that avoid unnecessary data copying. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/pprof@Blz9cpgKhuqtY75oUQw6I.md b/src/data/roadmaps/golang/content/pprof@Blz9cpgKhuqtY75oUQw6I.md index 1a3426211..a52a0b79a 100644 --- a/src/data/roadmaps/golang/content/pprof@Blz9cpgKhuqtY75oUQw6I.md +++ b/src/data/roadmaps/golang/content/pprof@Blz9cpgKhuqtY75oUQw6I.md @@ -1 +1,3 @@ -# pprof \ No newline at end of file +# pprof + +pprof is Go's built-in profiling tool that helps identify performance bottlenecks in your applications. It can profile CPU usage, memory allocations, blocking operations, and goroutine activity. You can collect profiles programmatically using the `net/http/pprof` package or through the `go tool pprof` command. The tool generates detailed reports and interactive visualizations showing where your program spends time or allocates memory. Understanding pprof is crucial for optimizing Go applications, diagnosing performance issues, and ensuring efficient resource usage in production environments. It's an essential tool for building high-performance Go applications. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/publishing-modules@CysLmwRqmQzOGAKM01AKF.md b/src/data/roadmaps/golang/content/publishing-modules@CysLmwRqmQzOGAKM01AKF.md index bb9a7a621..6da603817 100644 --- a/src/data/roadmaps/golang/content/publishing-modules@CysLmwRqmQzOGAKM01AKF.md +++ b/src/data/roadmaps/golang/content/publishing-modules@CysLmwRqmQzOGAKM01AKF.md @@ -1 +1,3 @@ -# Publishing Modules \ No newline at end of file +# Publishing Modules + +Share Go code through version control systems using semantic versioning tags. Go proxy system automatically discovers and serves modules. Follow Go conventions, maintain documentation, and ensure backward compatibility to contribute to the ecosystem. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/race-detection@GoV8yaQARJmO47e0_l_GY.md b/src/data/roadmaps/golang/content/race-detection@GoV8yaQARJmO47e0_l_GY.md index de235f2ce..946c20df2 100644 --- a/src/data/roadmaps/golang/content/race-detection@GoV8yaQARJmO47e0_l_GY.md +++ b/src/data/roadmaps/golang/content/race-detection@GoV8yaQARJmO47e0_l_GY.md @@ -1 +1,3 @@ -# Race Detection \ No newline at end of file +# Race Detection + +Race detection is a powerful feature in Go that helps identify race conditions in concurrent programs. A race condition occurs when multiple goroutines access shared memory simultaneously and at least one access is a write. Go's race detector is enabled using the `-race` flag with commands like `go run -race` or `go test -race`. It instruments your code at compile time to detect races at runtime, reporting detailed information about conflicting accesses. The race detector is essential for developing reliable concurrent applications and should be used regularly during development and testing. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/race-detector@7aTYeCd915F3UHqb6j0Az.md b/src/data/roadmaps/golang/content/race-detector@7aTYeCd915F3UHqb6j0Az.md index 68d270ced..4f99891ce 100644 --- a/src/data/roadmaps/golang/content/race-detector@7aTYeCd915F3UHqb6j0Az.md +++ b/src/data/roadmaps/golang/content/race-detector@7aTYeCd915F3UHqb6j0Az.md @@ -1 +1,3 @@ -# Race Detector \ No newline at end of file +# Race Detector + +Runtime tool detecting data races in concurrent programs using the `-race` flag. Tracks memory accesses and reports conflicts with detailed information including stack traces. Essential for finding concurrency bugs during development and testing. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/raw-string-literals@nzPe6XVqhtOZFbea6f2Hg.md b/src/data/roadmaps/golang/content/raw-string-literals@nzPe6XVqhtOZFbea6f2Hg.md index 7c4bd4094..edcfb9e40 100644 --- a/src/data/roadmaps/golang/content/raw-string-literals@nzPe6XVqhtOZFbea6f2Hg.md +++ b/src/data/roadmaps/golang/content/raw-string-literals@nzPe6XVqhtOZFbea6f2Hg.md @@ -1 +1,3 @@ -# Raw String Literals \ No newline at end of file +# Raw String Literals + +Enclosed in backticks (\`) and interpret characters literally without escape sequences. Preserve formatting including newlines. Ideal for regex, file paths, SQL queries, JSON templates, and multi-line text where escaping would be extensive. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/realtime-communication@o2EYfm1WSd8Eq_ZcXYreo.md b/src/data/roadmaps/golang/content/realtime-communication@o2EYfm1WSd8Eq_ZcXYreo.md index 3d3f26d15..f190ff070 100644 --- a/src/data/roadmaps/golang/content/realtime-communication@o2EYfm1WSd8Eq_ZcXYreo.md +++ b/src/data/roadmaps/golang/content/realtime-communication@o2EYfm1WSd8Eq_ZcXYreo.md @@ -1 +1,3 @@ -# Realtime Communication \ No newline at end of file +# Realtime Communication + +Realtime communication in Go enables instant bidirectional updates using WebSockets, Server-Sent Events, and messaging patterns. Go's concurrency makes it ideal for handling multiple connections. Essential for chat apps, live dashboards, and interactive applications requiring immediate synchronization. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/reflection@GO50AoBOjO-EaK3s36jSS.md b/src/data/roadmaps/golang/content/reflection@GO50AoBOjO-EaK3s36jSS.md index bcc10cdcf..45675c528 100644 --- a/src/data/roadmaps/golang/content/reflection@GO50AoBOjO-EaK3s36jSS.md +++ b/src/data/roadmaps/golang/content/reflection@GO50AoBOjO-EaK3s36jSS.md @@ -1 +1,3 @@ -# Reflection \ No newline at end of file +# Reflection + +Reflection allows runtime inspection and manipulation of types and values using the `reflect` package. Enables dynamic method calls and type examination but has performance overhead. Used in JSON marshaling, ORMs, and frameworks. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/regexp@9K5ffACdKNPJiWPq4tUWD.md b/src/data/roadmaps/golang/content/regexp@9K5ffACdKNPJiWPq4tUWD.md index d2c8d10ee..27bd223c5 100644 --- a/src/data/roadmaps/golang/content/regexp@9K5ffACdKNPJiWPq4tUWD.md +++ b/src/data/roadmaps/golang/content/regexp@9K5ffACdKNPJiWPq4tUWD.md @@ -1 +1,3 @@ -# regexp \ No newline at end of file +# regexp + +The `regexp` package provides regular expression functionality for pattern matching and text processing in Go. It implements the RE2 syntax, which is both powerful and safe (guarantees linear time execution). The package supports pattern compilation for performance, various matching methods (match, find, replace), submatch extraction, and both string and byte slice operations. Regular expressions are compiled once and can be reused for better performance. Understanding regular expressions is valuable for text validation, parsing, data extraction, and string manipulation tasks. The Go regexp package prioritizes safety and predictable performance over some advanced features found in other regex engines. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/revive@ksimJz7uvSh80ZIekSn_-.md b/src/data/roadmaps/golang/content/revive@ksimJz7uvSh80ZIekSn_-.md index d9b4ac3eb..c37c502e5 100644 --- a/src/data/roadmaps/golang/content/revive@ksimJz7uvSh80ZIekSn_-.md +++ b/src/data/roadmaps/golang/content/revive@ksimJz7uvSh80ZIekSn_-.md @@ -1 +1,3 @@ -# revive \ No newline at end of file +# revive + +Fast, configurable Go linter providing rich formatting and many rules for code analysis. Drop-in replacement for golint with better performance, configurable rules, and various output formats. Helps maintain consistent code quality across projects. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/runes@IAXI7OAAAG4fU6JvVNSZI.md b/src/data/roadmaps/golang/content/runes@IAXI7OAAAG4fU6JvVNSZI.md index 1241e13b4..e0d443c7d 100644 --- a/src/data/roadmaps/golang/content/runes@IAXI7OAAAG4fU6JvVNSZI.md +++ b/src/data/roadmaps/golang/content/runes@IAXI7OAAAG4fU6JvVNSZI.md @@ -1 +1,3 @@ -# Runes \ No newline at end of file +# Runes + +Represent Unicode code points as `int32` type. Enable proper handling of international characters and emojis. Use single quotes like `'A'` or `'δΈ­'`. Essential for internationalized applications and correctly processing global text content beyond ASCII. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/scope-and-shadowing@xUKsD2eTP9-RszHvKYp9Y.md b/src/data/roadmaps/golang/content/scope-and-shadowing@xUKsD2eTP9-RszHvKYp9Y.md index 2bdb02f3d..f3c282509 100644 --- a/src/data/roadmaps/golang/content/scope-and-shadowing@xUKsD2eTP9-RszHvKYp9Y.md +++ b/src/data/roadmaps/golang/content/scope-and-shadowing@xUKsD2eTP9-RszHvKYp9Y.md @@ -1 +1,3 @@ -# Scope and Shadowing \ No newline at end of file +# Scope and Shadowing + +Scope determines variable accessibility from universe to block level. Shadowing occurs when inner scope variables hide outer ones with same names. Go has package, function, and block scopes. Understanding prevents bugs from accidentally creating new variables. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/security@vulnerability-scanning.md b/src/data/roadmaps/golang/content/security@vulnerability-scanning.md new file mode 100644 index 000000000..b96f06a75 --- /dev/null +++ b/src/data/roadmaps/golang/content/security@vulnerability-scanning.md @@ -0,0 +1,3 @@ +# Security + +Go security involves input validation, secure communication, and vulnerability scanning. Built-in features like memory safety and strong typing help prevent issues. Tools like govulncheck identify dependency vulnerabilities, while static analysis detects security problems in code. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/select-statement@RBr1uAdngIsvSpIdHHOyV.md b/src/data/roadmaps/golang/content/select-statement@RBr1uAdngIsvSpIdHHOyV.md index 31e80e59c..936bde0ff 100644 --- a/src/data/roadmaps/golang/content/select-statement@RBr1uAdngIsvSpIdHHOyV.md +++ b/src/data/roadmaps/golang/content/select-statement@RBr1uAdngIsvSpIdHHOyV.md @@ -1 +1,3 @@ -# Select Statement \ No newline at end of file +# Select Statement + +The select statement in Go is a powerful control structure that enables non-blocking communication with multiple channels. It allows a goroutine to wait on multiple channel operations simultaneously and execute the case that's ready first. Select can handle send operations, receive operations, and includes a default case for non-blocking behavior when no channels are ready. This makes it essential for implementing timeouts, handling multiple data sources, coordinating between goroutines, and building responsive concurrent systems. The select statement is unique to Go and is fundamental to the language's approach to concurrent programming and channel-based communication. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/sentinel-errors@vjfqq1XVS25FVe9smtel0.md b/src/data/roadmaps/golang/content/sentinel-errors@vjfqq1XVS25FVe9smtel0.md index a864c8516..f2b1b30b9 100644 --- a/src/data/roadmaps/golang/content/sentinel-errors@vjfqq1XVS25FVe9smtel0.md +++ b/src/data/roadmaps/golang/content/sentinel-errors@vjfqq1XVS25FVe9smtel0.md @@ -1 +1,3 @@ -# Sentinel Errors \ No newline at end of file +# Sentinel Errors + +Predefined error values representing specific conditions, defined as package-level variables. Check using `errors.Is()` or direct comparison. Examples: `io.EOF`. Enable predictable APIs where callers handle specific errors differently. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/setting-up-the-environment@J5mU0v491qrm-mr1W3Msd.md b/src/data/roadmaps/golang/content/setting-up-the-environment@J5mU0v491qrm-mr1W3Msd.md index ff53f8326..333f9e6f7 100644 --- a/src/data/roadmaps/golang/content/setting-up-the-environment@J5mU0v491qrm-mr1W3Msd.md +++ b/src/data/roadmaps/golang/content/setting-up-the-environment@J5mU0v491qrm-mr1W3Msd.md @@ -1 +1,3 @@ -# Setting up the Environment \ No newline at end of file +# Setting up the Environment + +Install Go from official website, configure PATH, and set up workspace. Configure editor with Go support (VS Code, GoLand, Vim/Emacs). Use modules for dependency management. Verify installation with `go version` and test with simple program. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/slice-to-array-conversion@j0zmfpaufr5TAZa_Bh8Vu.md b/src/data/roadmaps/golang/content/slice-to-array-conversion@j0zmfpaufr5TAZa_Bh8Vu.md index 05eeef38f..13c7dc1d1 100644 --- a/src/data/roadmaps/golang/content/slice-to-array-conversion@j0zmfpaufr5TAZa_Bh8Vu.md +++ b/src/data/roadmaps/golang/content/slice-to-array-conversion@j0zmfpaufr5TAZa_Bh8Vu.md @@ -1 +1,3 @@ -# Slice to Array Conversion \ No newline at end of file +# Slice to Array Conversion + +Convert slice to array using `[N]T(slice)` (Go 1.17+). Copies data from slice to fixed-size array. Panics if slice has fewer than N elements. Useful when array semantics or specific size guarantees are needed. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/slices@3aoMFQXIh3Qdo04isHwe_.md b/src/data/roadmaps/golang/content/slices@3aoMFQXIh3Qdo04isHwe_.md index 18773da0a..48f6c60f4 100644 --- a/src/data/roadmaps/golang/content/slices@3aoMFQXIh3Qdo04isHwe_.md +++ b/src/data/roadmaps/golang/content/slices@3aoMFQXIh3Qdo04isHwe_.md @@ -1 +1,3 @@ -# Slices \ No newline at end of file +# Slices + +Slices are dynamic arrays in Go that provide a flexible way to work with sequences of data. Unlike arrays which have a fixed size, slices can grow and shrink as needed. A slice consists of three components: a pointer to an underlying array, a length (number of elements), and a capacity (maximum number of elements). Slices are created using `make()`, slice literals, or by slicing existing arrays or slices. They are reference types, meaning multiple slices can share the same underlying array. Understanding slices is crucial as they are one of the most commonly used data structures in Go. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/slog@hFlbSSBMcJtjXNL8jAcbc.md b/src/data/roadmaps/golang/content/slog@hFlbSSBMcJtjXNL8jAcbc.md index aff1ee734..a23c7da4c 100644 --- a/src/data/roadmaps/golang/content/slog@hFlbSSBMcJtjXNL8jAcbc.md +++ b/src/data/roadmaps/golang/content/slog@hFlbSSBMcJtjXNL8jAcbc.md @@ -1 +1,3 @@ -# slog \ No newline at end of file +# slog + +The `slog` package, introduced in Go 1.21, is the standard library's structured logging solution. It provides fast, structured logging with support for different output formats (text, JSON), log levels (debug, info, warn, error), and contextual attributes. Slog is designed for high performance with minimal allocations and supports both simple and structured logging patterns. It includes features like log level filtering, custom handlers, and integration with the context package for request-scoped logging. Understanding slog is important for building production applications that require comprehensive logging, monitoring, and debugging capabilities while maintaining excellent performance characteristics. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/stack-traces--debugging@rR_BIgiSR63rVlO2Igzin.md b/src/data/roadmaps/golang/content/stack-traces--debugging@rR_BIgiSR63rVlO2Igzin.md index 80974b1ec..b254443ae 100644 --- a/src/data/roadmaps/golang/content/stack-traces--debugging@rR_BIgiSR63rVlO2Igzin.md +++ b/src/data/roadmaps/golang/content/stack-traces--debugging@rR_BIgiSR63rVlO2Igzin.md @@ -1 +1,3 @@ -# Stack Traces & Debugging \ No newline at end of file +# Stack Traces & Debugging + +Go automatically prints stack traces on panic showing call chain. Tools include Delve debugger, pprof profiling, and race detection. Stack traces show function calls, file locations, and line numbers for effective troubleshooting. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/standard-library@-Qy9DEWVYUNRHWiXXhIWU.md b/src/data/roadmaps/golang/content/standard-library@-Qy9DEWVYUNRHWiXXhIWU.md index 1839a2783..0f6502257 100644 --- a/src/data/roadmaps/golang/content/standard-library@-Qy9DEWVYUNRHWiXXhIWU.md +++ b/src/data/roadmaps/golang/content/standard-library@-Qy9DEWVYUNRHWiXXhIWU.md @@ -1 +1,3 @@ -# Standard Library \ No newline at end of file +# Standard Library + +Go's standard library is comprehensive and production-ready, providing a wide range of packages for common programming tasks without requiring external dependencies. It includes packages for HTTP servers and clients, JSON handling, file I/O, regular expressions, cryptography, time manipulation, and much more. The standard library is designed with consistency and simplicity in mind, following Go's philosophy of clear, readable code. Learning the standard library is essential for Go developers as it provides the foundation for most applications and demonstrates Go's idiomatic patterns and best practices. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/staticcheck@954ffF8CmXYX-L36Lfl44.md b/src/data/roadmaps/golang/content/staticcheck@954ffF8CmXYX-L36Lfl44.md index a112b33fe..9de35c8a2 100644 --- a/src/data/roadmaps/golang/content/staticcheck@954ffF8CmXYX-L36Lfl44.md +++ b/src/data/roadmaps/golang/content/staticcheck@954ffF8CmXYX-L36Lfl44.md @@ -1 +1,3 @@ -# staticcheck \ No newline at end of file +# staticcheck + +State-of-the-art Go linter catching bugs, performance issues, and style problems through static analysis. Provides more comprehensive checking than go vet with very few false positives. Detects unused code, incorrect API usage, and subtle bugs. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/strings@ZxZpReGdPq8ziSlYmf2nj.md b/src/data/roadmaps/golang/content/strings@ZxZpReGdPq8ziSlYmf2nj.md index def954523..544357ad1 100644 --- a/src/data/roadmaps/golang/content/strings@ZxZpReGdPq8ziSlYmf2nj.md +++ b/src/data/roadmaps/golang/content/strings@ZxZpReGdPq8ziSlYmf2nj.md @@ -1 +1,3 @@ -# Strings \ No newline at end of file +# Strings + +Immutable sequences of bytes representing UTF-8 encoded text. String operations create new strings rather than modifying existing ones. Iterate by bytes (indexing) or runes (for range). Convert between strings and byte slices. Understanding strings helps with text manipulation and performance. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/struct-tags--json@SW2uMlhfC-dnQakShs2km.md b/src/data/roadmaps/golang/content/struct-tags--json@SW2uMlhfC-dnQakShs2km.md index 2bb24c0c5..ca8709d45 100644 --- a/src/data/roadmaps/golang/content/struct-tags--json@SW2uMlhfC-dnQakShs2km.md +++ b/src/data/roadmaps/golang/content/struct-tags--json@SW2uMlhfC-dnQakShs2km.md @@ -1 +1,3 @@ -# Struct Tags & JSON \ No newline at end of file +# Struct Tags & JSON + +Struct tags provide metadata about fields using backticks with key-value pairs. JSON tags control field names, omit empty fields, or skip fields. Example: `json:"name,omitempty"`. Essential for APIs and data serialization formats. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/structs@wRwt9JHZPmq8uapxMjn0a.md b/src/data/roadmaps/golang/content/structs@wRwt9JHZPmq8uapxMjn0a.md index 17c24f6c0..db9933b10 100644 --- a/src/data/roadmaps/golang/content/structs@wRwt9JHZPmq8uapxMjn0a.md +++ b/src/data/roadmaps/golang/content/structs@wRwt9JHZPmq8uapxMjn0a.md @@ -1 +1,3 @@ -# Structs \ No newline at end of file +# Structs + +Structs in Go are custom data types that group together related data fields under a single name. They are similar to classes in other languages but without methods (methods are defined separately). Structs allow you to create complex data models, organize related information, and define the structure of your application's data. You can create instances of structs, access their fields using dot notation, and pass them to functions. Structs are fundamental to Go programming and are often used with interfaces to create flexible, object-oriented designs while maintaining Go's simplicity. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/switch@ZmPhiTrB8EK0LDdaJOhc8.md b/src/data/roadmaps/golang/content/switch@ZmPhiTrB8EK0LDdaJOhc8.md index 80b4fcb4e..8bfe6c97f 100644 --- a/src/data/roadmaps/golang/content/switch@ZmPhiTrB8EK0LDdaJOhc8.md +++ b/src/data/roadmaps/golang/content/switch@ZmPhiTrB8EK0LDdaJOhc8.md @@ -1 +1,3 @@ -# switch \ No newline at end of file +# switch + +The switch statement in Go provides a clean way to compare a variable against multiple values and execute corresponding code blocks. Go's switch is more powerful than in many languages - it doesn't require break statements (no fall-through by default), can switch on any comparable type, supports multiple values per case, and includes expression switches and type switches. Switch statements can also work without an expression, acting like a series of if-else statements. They're more readable than long if-else chains and are essential for clean conditional logic, especially when checking many possible values or implementing state machines. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/sync-package@nOI0juYhqJXNTiJBU4bKH.md b/src/data/roadmaps/golang/content/sync-package@nOI0juYhqJXNTiJBU4bKH.md index d999cb538..aeca52ab8 100644 --- a/src/data/roadmaps/golang/content/sync-package@nOI0juYhqJXNTiJBU4bKH.md +++ b/src/data/roadmaps/golang/content/sync-package@nOI0juYhqJXNTiJBU4bKH.md @@ -1 +1,3 @@ -# `sync` Package \ No newline at end of file +# `sync` Package + +The `sync` package provides basic synchronization primitives for coordinating goroutines and protecting shared resources from race conditions. Key components include Mutex (mutual exclusion locks), RWMutex (read-write locks), WaitGroup (waiting for goroutines to complete), Once (ensuring functions run only once), and Cond (condition variables). These tools are essential for writing safe concurrent programs when channels alone aren't sufficient. While Go encourages communication through channels, the sync package is crucial for scenarios requiring traditional locking mechanisms or synchronizing goroutine lifecycles. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/table-driven-tests@6-mr65JzXbRzIukE7jzoZ.md b/src/data/roadmaps/golang/content/table-driven-tests@6-mr65JzXbRzIukE7jzoZ.md index b4835503e..9ef73f6c5 100644 --- a/src/data/roadmaps/golang/content/table-driven-tests@6-mr65JzXbRzIukE7jzoZ.md +++ b/src/data/roadmaps/golang/content/table-driven-tests@6-mr65JzXbRzIukE7jzoZ.md @@ -1 +1,3 @@ -# Table-driven Tests \ No newline at end of file +# Table-driven Tests + +Table-driven tests use slices of test cases to test multiple scenarios with the same logic. Each case contains inputs and expected outputs. Makes adding test cases easy and provides comprehensive coverage with minimal code duplication. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/testing-package-basics@nZkLFmm2GENL81y5LB0c1.md b/src/data/roadmaps/golang/content/testing-package-basics@nZkLFmm2GENL81y5LB0c1.md index 68243c44f..c45995c03 100644 --- a/src/data/roadmaps/golang/content/testing-package-basics@nZkLFmm2GENL81y5LB0c1.md +++ b/src/data/roadmaps/golang/content/testing-package-basics@nZkLFmm2GENL81y5LB0c1.md @@ -1 +1,3 @@ -# `testing` package basics \ No newline at end of file +# `testing` package basics + +The `testing` package is Go's built-in framework for writing and running unit tests, benchmarks, and examples. Tests in Go are written in files ending with `_test.go` and test functions must start with `Test` followed by a capitalized name. The testing package provides a simple yet powerful API with the `*testing.T` type for tests and `*testing.B` for benchmarks. Tests are run using the `go test` command, which automatically discovers and executes test functions. Go's testing philosophy emphasizes simplicity and clarity, making it easy to write comprehensive test suites that ensure code reliability and facilitate refactoring. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/time@aK9EQO1JR9hYIMkS3mdai.md b/src/data/roadmaps/golang/content/time@aK9EQO1JR9hYIMkS3mdai.md index 3d26b6f71..2371beec6 100644 --- a/src/data/roadmaps/golang/content/time@aK9EQO1JR9hYIMkS3mdai.md +++ b/src/data/roadmaps/golang/content/time@aK9EQO1JR9hYIMkS3mdai.md @@ -1 +1,3 @@ -# time \ No newline at end of file +# time + +The `time` package provides functionality for measuring and displaying time, handling durations, and working with timezones. It includes types like `Time` for representing instants in time, `Duration` for representing spans of time, and functions for parsing, formatting, and manipulating temporal data. The package supports timezone-aware operations, time arithmetic, timers, tickers, and various time formats. Understanding the time package is essential for scheduling operations, measuring performance, handling timeouts, and working with timestamps in applications. It's particularly important for building systems that need to handle time-sensitive operations or work across different timezones. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/trace@RE2jfECHkWvy3ldDZL938.md b/src/data/roadmaps/golang/content/trace@RE2jfECHkWvy3ldDZL938.md index f672b2cea..20e77a68a 100644 --- a/src/data/roadmaps/golang/content/trace@RE2jfECHkWvy3ldDZL938.md +++ b/src/data/roadmaps/golang/content/trace@RE2jfECHkWvy3ldDZL938.md @@ -1 +1,3 @@ -# trace \ No newline at end of file +# trace + +The Go trace tool captures execution traces showing goroutine execution, system calls, GC, and scheduling. Generate traces with `runtime/trace` package, analyze with `go tool trace`. Provides web interface for diagnosing concurrency issues and performance bottlenecks. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/type-assertions@4EJ4WnH2HA3ci2uoqmNex.md b/src/data/roadmaps/golang/content/type-assertions@4EJ4WnH2HA3ci2uoqmNex.md index 160cc4930..e8492e624 100644 --- a/src/data/roadmaps/golang/content/type-assertions@4EJ4WnH2HA3ci2uoqmNex.md +++ b/src/data/roadmaps/golang/content/type-assertions@4EJ4WnH2HA3ci2uoqmNex.md @@ -1 +1,3 @@ -# Type Assertions \ No newline at end of file +# Type Assertions + +Type assertions in Go provide a way to extract the underlying concrete value from an interface. The syntax `value, ok := interfaceVariable.(ConcreteType)` attempts to assert that the interface holds a value of the specified type. If successful, it returns the value and true; if not, it returns the zero value and false. Without the second return value, a failed type assertion panics. Type assertions are essential when working with empty interfaces (`interface{}`), handling different types in the same function, and implementing type-specific behavior. They're commonly used with type switches for handling multiple possible types efficiently and safely. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/type-constraints@8o6A2kGnupGYaaTwgsTDp.md b/src/data/roadmaps/golang/content/type-constraints@8o6A2kGnupGYaaTwgsTDp.md index 1ccde2cb6..49fd0b93a 100644 --- a/src/data/roadmaps/golang/content/type-constraints@8o6A2kGnupGYaaTwgsTDp.md +++ b/src/data/roadmaps/golang/content/type-constraints@8o6A2kGnupGYaaTwgsTDp.md @@ -1 +1,3 @@ -# Type Constraints \ No newline at end of file +# Type Constraints + +Specify which types can be used as type arguments for generics. Defined using interfaces with method signatures or type sets. Common constraints include `any`, `comparable`, and custom constraints. Enable writing generic code that safely operates on type parameters. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/type-conversion@2IFxz3sFqDvUvzWNVwlWC.md b/src/data/roadmaps/golang/content/type-conversion@2IFxz3sFqDvUvzWNVwlWC.md index 4d66ae257..d65b3d809 100644 --- a/src/data/roadmaps/golang/content/type-conversion@2IFxz3sFqDvUvzWNVwlWC.md +++ b/src/data/roadmaps/golang/content/type-conversion@2IFxz3sFqDvUvzWNVwlWC.md @@ -1 +1,3 @@ -# Type Conversion \ No newline at end of file +# Type Conversion + +Convert values between different types using `Type(value)` syntax. Go requires explicit conversion even between related types like `int` and `int64`. Essential for working with different data types and ensuring type compatibility in programs. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/type-inference@36gt0FmNDxuIIV47aqBeH.md b/src/data/roadmaps/golang/content/type-inference@36gt0FmNDxuIIV47aqBeH.md index b32b1bfb6..6d02cb7d5 100644 --- a/src/data/roadmaps/golang/content/type-inference@36gt0FmNDxuIIV47aqBeH.md +++ b/src/data/roadmaps/golang/content/type-inference@36gt0FmNDxuIIV47aqBeH.md @@ -1 +1,3 @@ -# Type Inference \ No newline at end of file +# Type Inference + +Allows compiler to automatically determine generic type arguments based on function arguments or context. Reduces need for explicit type specification while maintaining type safety. Makes generic functions cleaner and more readable by eliminating redundant type specifications. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/type-switch@6r9XbwlBtHmJrhviG2cTD.md b/src/data/roadmaps/golang/content/type-switch@6r9XbwlBtHmJrhviG2cTD.md index 11f96e4b5..58e9714be 100644 --- a/src/data/roadmaps/golang/content/type-switch@6r9XbwlBtHmJrhviG2cTD.md +++ b/src/data/roadmaps/golang/content/type-switch@6r9XbwlBtHmJrhviG2cTD.md @@ -1 +1,3 @@ -# Type Switch \ No newline at end of file +# Type Switch + +Type switches in Go provide a clean way to perform different actions based on the dynamic type of an interface value. Using the syntax `switch v := interfaceVar.(type)`, you can check multiple types in a single construct and execute type-specific code for each case. Type switches are more efficient and readable than multiple type assertions, especially when handling many possible types. They're commonly used in functions that accept empty interfaces, implementing polymorphic behavior, serialization/deserialization logic, and building flexible APIs that can handle various input types. Type switches make Go's static typing more flexible while maintaining safety and performance. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/unsafe-package@tM-AAWqMJsYZ1i6DCfBeD.md b/src/data/roadmaps/golang/content/unsafe-package@tM-AAWqMJsYZ1i6DCfBeD.md index dff8bfe84..77b10e4f3 100644 --- a/src/data/roadmaps/golang/content/unsafe-package@tM-AAWqMJsYZ1i6DCfBeD.md +++ b/src/data/roadmaps/golang/content/unsafe-package@tM-AAWqMJsYZ1i6DCfBeD.md @@ -1 +1,3 @@ -# Unsafe Package \ No newline at end of file +# Unsafe Package + +The `unsafe` package bypasses Go's type and memory safety for direct memory manipulation and pointer arithmetic. Powerful but dangerous - can cause crashes and vulnerabilities. Used for systems programming and performance-critical code. Use with extreme caution. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/urfavecli@bmNLSk-XuK2EuLxPR1Sxh.md b/src/data/roadmaps/golang/content/urfavecli@bmNLSk-XuK2EuLxPR1Sxh.md index 9ef8b4aec..10f4a0512 100644 --- a/src/data/roadmaps/golang/content/urfavecli@bmNLSk-XuK2EuLxPR1Sxh.md +++ b/src/data/roadmaps/golang/content/urfavecli@bmNLSk-XuK2EuLxPR1Sxh.md @@ -1 +1,3 @@ -# urfave/cli \ No newline at end of file +# urfave/cli + +urfave/cli is a simple package for building command-line applications with intuitive API for commands, flags, and arguments. Features automatic help generation, bash completion, nested subcommands, and environment variable integration for lightweight CLI tools. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/using-3rd-party-packages@eBv3i2cNA7vc01jLAbB8m.md b/src/data/roadmaps/golang/content/using-3rd-party-packages@eBv3i2cNA7vc01jLAbB8m.md index bc6b6576e..5e3a417b3 100644 --- a/src/data/roadmaps/golang/content/using-3rd-party-packages@eBv3i2cNA7vc01jLAbB8m.md +++ b/src/data/roadmaps/golang/content/using-3rd-party-packages@eBv3i2cNA7vc01jLAbB8m.md @@ -1 +1,3 @@ -# Using 3rd Party Packages \ No newline at end of file +# Using 3rd Party Packages + +Import external libraries using `go get package-url` which updates `go.mod`. Consider maintenance status, documentation, license, and security when choosing packages. Go modules handle version management and ensure reproducible builds. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/value-receivers@99a4irV044ybZN-boMgHv.md b/src/data/roadmaps/golang/content/value-receivers@99a4irV044ybZN-boMgHv.md index 162435926..db6b0a2b6 100644 --- a/src/data/roadmaps/golang/content/value-receivers@99a4irV044ybZN-boMgHv.md +++ b/src/data/roadmaps/golang/content/value-receivers@99a4irV044ybZN-boMgHv.md @@ -1 +1,3 @@ -# Value Receivers \ No newline at end of file +# Value Receivers + +Methods receive copy of struct rather than pointer. Use `func (v Type) methodName()` syntax. Appropriate when method doesn't modify receiver or struct is small. Can be called on both values and pointers with Go automatically dereferencing. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/var-vs-@pJUkMcrUvcxuR_w89-eEq.md b/src/data/roadmaps/golang/content/var-vs-@pJUkMcrUvcxuR_w89-eEq.md new file mode 100644 index 000000000..788f54709 --- /dev/null +++ b/src/data/roadmaps/golang/content/var-vs-@pJUkMcrUvcxuR_w89-eEq.md @@ -0,0 +1,3 @@ +# var vs := + +Two variable declaration methods: `var` allows explicit types and package-level declarations, `:=` provides type inference and requires initialization (function-only). Choose based on context and type specification needs. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/variables--constants@BZKSsTgm28WV4nA74NYHO.md b/src/data/roadmaps/golang/content/variables--constants@BZKSsTgm28WV4nA74NYHO.md index b67c0d05b..90f73f971 100644 --- a/src/data/roadmaps/golang/content/variables--constants@BZKSsTgm28WV4nA74NYHO.md +++ b/src/data/roadmaps/golang/content/variables--constants@BZKSsTgm28WV4nA74NYHO.md @@ -1 +1,3 @@ -# Variables & Constants \ No newline at end of file +# Variables & Constants + +Variables and constants are fundamental building blocks for storing and managing data in Go programs. Variables hold values that can change during program execution and are declared using `var` keyword or the short declaration operator `:=`. Constants hold values that cannot change and are declared using the `const` keyword. Go supports various declaration styles, type inference, zero values (default values for uninitialized variables), and block-level scope. Understanding how to properly declare, initialize, and use variables and constants is essential for writing any Go program and managing data effectively. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/variadic-functions@MUJfa0jIL_S_b2ndNpVVw.md b/src/data/roadmaps/golang/content/variadic-functions@MUJfa0jIL_S_b2ndNpVVw.md index 99c6f9c6e..5cc58afb9 100644 --- a/src/data/roadmaps/golang/content/variadic-functions@MUJfa0jIL_S_b2ndNpVVw.md +++ b/src/data/roadmaps/golang/content/variadic-functions@MUJfa0jIL_S_b2ndNpVVw.md @@ -1 +1,3 @@ -# Variadic Functions \ No newline at end of file +# Variadic Functions + +Variadic functions in Go can accept a variable number of arguments of the same type using the `...` syntax. The variadic parameter must be the last parameter and is treated as a slice within the function. Examples include `fmt.Printf()` and `append()`. To call a variadic function with a slice, you use the `...` operator to "expand" the slice. Variadic functions are useful for creating flexible APIs, utility functions that work with varying amounts of data, and building wrapper functions. They provide convenience and flexibility while maintaining type safety, making function calls more natural when the number of arguments isn't known at compile time. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/waitgroups@amqOwSgVFDymAsDIobwiK.md b/src/data/roadmaps/golang/content/waitgroups@amqOwSgVFDymAsDIobwiK.md index f731b6fb5..309165f9d 100644 --- a/src/data/roadmaps/golang/content/waitgroups@amqOwSgVFDymAsDIobwiK.md +++ b/src/data/roadmaps/golang/content/waitgroups@amqOwSgVFDymAsDIobwiK.md @@ -1 +1,3 @@ -# WaitGroups \ No newline at end of file +# WaitGroups + +WaitGroups in Go's sync package provide a way to wait for a collection of goroutines to finish executing. A WaitGroup maintains a counter that represents the number of goroutines to wait for. You increment the counter with `Add()`, decrement it with `Done()` (typically called with `defer` in each goroutine), and block until the counter reaches zero with `Wait()`. This is essential for coordinating goroutine completion, ensuring all work is finished before proceeding, and preventing main function exit before goroutines complete. WaitGroups are commonly used in scenarios where you need to process multiple items concurrently and wait for all processing to complete. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/web-development@CwGw3CDVLqErQGTwjzhmL.md b/src/data/roadmaps/golang/content/web-development@CwGw3CDVLqErQGTwjzhmL.md index 2e2ffdbf0..f0b9e5c20 100644 --- a/src/data/roadmaps/golang/content/web-development@CwGw3CDVLqErQGTwjzhmL.md +++ b/src/data/roadmaps/golang/content/web-development@CwGw3CDVLqErQGTwjzhmL.md @@ -1 +1,3 @@ -# Web Development \ No newline at end of file +# Web Development + +Go is an excellent choice for web development, offering built-in support for HTTP servers, efficient concurrency handling, and a rich ecosystem of web frameworks and libraries. The standard library's `net/http` package provides powerful tools for building web servers, handling HTTP requests and responses, and creating RESTful APIs. Go's performance characteristics, simple deployment model (single binary), and excellent concurrency support make it ideal for building scalable web applications, microservices, and APIs. Whether you use the standard library or popular frameworks, Go provides the tools needed for modern web development. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/why-generics@9EdDI0vJaEmz3XxXMrpX9.md b/src/data/roadmaps/golang/content/why-generics@9EdDI0vJaEmz3XxXMrpX9.md index 3d05cee15..27830df15 100644 --- a/src/data/roadmaps/golang/content/why-generics@9EdDI0vJaEmz3XxXMrpX9.md +++ b/src/data/roadmaps/golang/content/why-generics@9EdDI0vJaEmz3XxXMrpX9.md @@ -1 +1,3 @@ -# Why Generics? \ No newline at end of file +# Why Generics? + +Introduced in Go 1.18 to solve code duplication when working with multiple types. Before generics: separate functions per type, empty interfaces (losing type safety), or code generation. Enable type-safe, reusable code maintaining compile-time checking. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/why-use-go@4PrkkoZ5fY-oow0O-bVhu.md b/src/data/roadmaps/golang/content/why-use-go@4PrkkoZ5fY-oow0O-bVhu.md index 292e50462..ffe887e8c 100644 --- a/src/data/roadmaps/golang/content/why-use-go@4PrkkoZ5fY-oow0O-bVhu.md +++ b/src/data/roadmaps/golang/content/why-use-go@4PrkkoZ5fY-oow0O-bVhu.md @@ -1 +1,3 @@ -# Why use Go \ No newline at end of file +# Why use Go + +Go offers exceptional performance with single binary deployment, built-in concurrency, fast compilation, and comprehensive standard library. Simple language that's easy to learn and maintain. Excels at web services, microservices, CLI tools, and system software. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/with-maps--slices@oAvCO3GOKktkbmPahkPlT.md b/src/data/roadmaps/golang/content/with-maps--slices@oAvCO3GOKktkbmPahkPlT.md index cfe18c6c0..ce591f8f7 100644 --- a/src/data/roadmaps/golang/content/with-maps--slices@oAvCO3GOKktkbmPahkPlT.md +++ b/src/data/roadmaps/golang/content/with-maps--slices@oAvCO3GOKktkbmPahkPlT.md @@ -1 +1,3 @@ -# With Maps & Slices \ No newline at end of file +# With Maps & Slices + +Maps and slices in Go are reference types, meaning they contain pointers to underlying data structures. When you pass maps or slices to functions, you're passing references rather than copies, so modifications inside functions affect the original data. However, for slices, operations that change length or capacity (like append) may create new underlying arrays, so if you need to modify a slice's length from within a function, you typically need to return the modified slice or pass a pointer to the slice. Understanding this behavior is crucial for effective data manipulation and avoiding common pitfalls when working with these fundamental Go data structures. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/worker-pools@z8ItWHAupaastLcXY3npY.md b/src/data/roadmaps/golang/content/worker-pools@z8ItWHAupaastLcXY3npY.md index f75f6372a..cb8a8a25b 100644 --- a/src/data/roadmaps/golang/content/worker-pools@z8ItWHAupaastLcXY3npY.md +++ b/src/data/roadmaps/golang/content/worker-pools@z8ItWHAupaastLcXY3npY.md @@ -1 +1,3 @@ -# Worker Pools \ No newline at end of file +# Worker Pools + +Worker pools are a concurrency pattern in Go that uses a fixed number of goroutines (workers) to process jobs from a shared queue. This pattern is useful for controlling resource usage, limiting concurrent operations, and efficiently processing large numbers of tasks. Worker pools typically consist of job channels, result channels, and a predetermined number of worker goroutines that continuously process jobs. This approach prevents resource exhaustion that could occur with unlimited goroutine creation and provides predictable performance characteristics. Understanding worker pools is essential for building scalable applications that need to process many concurrent tasks while maintaining control over system resources. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/wrappingunwrapping-errors@s2WlOMMKNXf6O2Qiqcm_m.md b/src/data/roadmaps/golang/content/wrappingunwrapping-errors@s2WlOMMKNXf6O2Qiqcm_m.md index 476573413..94b636457 100644 --- a/src/data/roadmaps/golang/content/wrappingunwrapping-errors@s2WlOMMKNXf6O2Qiqcm_m.md +++ b/src/data/roadmaps/golang/content/wrappingunwrapping-errors@s2WlOMMKNXf6O2Qiqcm_m.md @@ -1 +1,3 @@ -# Wrapping/Unwrapping Errors \ No newline at end of file +# Wrapping/Unwrapping Errors + +Create error chains preserving original errors while adding context using `fmt.Errorf()` with `%w` verb. Use `errors.Unwrap()`, `errors.Is()`, and `errors.As()` to work with wrapped errors. Enables rich error contexts for easier debugging. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/zap@4D8QsZVAUB9vGbVFgRHt4.md b/src/data/roadmaps/golang/content/zap@4D8QsZVAUB9vGbVFgRHt4.md index 0698af580..7150c084d 100644 --- a/src/data/roadmaps/golang/content/zap@4D8QsZVAUB9vGbVFgRHt4.md +++ b/src/data/roadmaps/golang/content/zap@4D8QsZVAUB9vGbVFgRHt4.md @@ -1 +1,3 @@ -# Zap \ No newline at end of file +# Zap + +Zap is a high-performance structured logging library by Uber offering both structured and printf-style APIs. Features include JSON/console formats, configurable levels, sampling, and production-optimized performance through careful memory management. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/zero-values@QWixUXjC8YG-i1gsKVY1v.md b/src/data/roadmaps/golang/content/zero-values@QWixUXjC8YG-i1gsKVY1v.md index cf1c600a7..a37d32bb3 100644 --- a/src/data/roadmaps/golang/content/zero-values@QWixUXjC8YG-i1gsKVY1v.md +++ b/src/data/roadmaps/golang/content/zero-values@QWixUXjC8YG-i1gsKVY1v.md @@ -1 +1,3 @@ -# Zero Values \ No newline at end of file +# Zero Values + +Default values for uninitialized variables: `0` for numbers, `false` for booleans, `""` for strings, `nil` for pointers/slices/maps. Ensures predictable initial state and reduces initialization errors. Fundamental for reliable Go code. \ No newline at end of file diff --git a/src/data/roadmaps/golang/content/zerolog@TR7N68_evDMu3qWHbGJcz.md b/src/data/roadmaps/golang/content/zerolog@TR7N68_evDMu3qWHbGJcz.md index f72438d08..f94def726 100644 --- a/src/data/roadmaps/golang/content/zerolog@TR7N68_evDMu3qWHbGJcz.md +++ b/src/data/roadmaps/golang/content/zerolog@TR7N68_evDMu3qWHbGJcz.md @@ -1 +1,3 @@ -# Zerolog \ No newline at end of file +# Zerolog + +Zerolog is a zero-allocation JSON logger focusing on performance and simplicity. Provides structured logging with fluent API, various log levels, and no memory allocations during operations, making it ideal for high-throughput production applications. \ No newline at end of file