appsec.fyi · Sources

blog.golang.org

5 curated AppSec resources from blog.golang.org across 1 topics on appsec.fyi.

blog.golang.org

Resources curated from this publisher and indexed across appsec.fyi topic pages. Last item added: 2021-02-28.

Date Added Resource Excerpt
2021-02-28 2021The Laws of Reflection - The Go BlogLibrary explaining Go's reflection model, covering its relationship with types and interfaces. It details how reflection accesses the type and value pair within an interface using `reflect.TypeOf` and `reflect.ValueOf`, enabling examination of data structures and their underlying kinds, such as `Float64` or `Slice`, and retrieving their stored values.
2021-02-28 2021Constants - The Go BlogLibrary explaining Go's constant system; it details how untyped constants differ from variables, enabling operations that would otherwise fail due to strict numeric type mixing. This freedom is achieved by untyped constants having a default type when assigned, allowing flexible use in expressions and function arguments without explicit conversions.
2021-02-28 2021Strings, bytes, runes and characters in Go - The Go BlogLibrary for understanding Go strings, detailing the difference between bytes, characters, and runes, and how strings function as read-only byte slices. It explores methods for inspecting string content, including byte-by-byte iteration and various `fmt.Printf` formatting verbs like `%x`, `%q`, and `%+q`, which are crucial for debugging and comprehending text encoding, particularly UTF-8. The library clarifies how Go source code, being UTF-8, influences string literal representation.
2021-02-28 2021Go Slices: usage and internals - The Go BlogReference on Go slices detailing their underlying array structure, differences in length and capacity, and how to manipulate them using slicing, `make`, `copy`, and the built-in `append` function.
2021-01-12 2021A Proposal for Adding Generics to Go - The Go BlogProposal for Go generics enables type parameters for functions and types, allowing for generic programming that shares code and simplifies program building. This feature, a long-requested addition, facilitates writing code that operates on arbitrary data types specified later, improving code reusability. The design, developed with community input and presented at GopherCon, aims for backward compatibility and will undergo the formal language change proposal process for inclusion in future Go versions.