type Dec ¶| pkg.go.dev
func AppendExtension ¶| pkg.go.dev
Overview ¶| pkg.go.dev
View Source| pkg.go.dev
type Duration ¶| pkg.go.dev
type Align ¶| pkg.go.dev
type Quantity ¶| pkg.go.dev
type BinaryAppender ¶| pkg.go.dev
In which I rewrite my toy pygit client in Go to see how suitable Go is for simple scripts.| benhoyt.com
TL;DR ¶ Some of the wisdom contained in Josh Bloch’s Effective Java book is relevant to Go. panic and recover are best reserved for exceptional circumstances. Reliance on panic and recover can noticeably slow down execution, incurs heap allocations, and precludes inlining. Internal handling of failure cases via panic and recover is tolerable and sometimes beneficial. Abusing Java exceptions for control flow ¶ Even though my Java days are long gone and Go has been my language of predilecti...| jub0bs.com
func All ¶| pkg.go.dev
func Compare ¶| pkg.go.dev
func AppendRune ¶| pkg.go.dev
type ColumnConverter| pkg.go.dev
type Client ¶| pkg.go.dev
A better story than that tortuous title suggests!| philpearl.github.io
func CreateCertificate ¶| pkg.go.dev
type Reader ¶| pkg.go.dev
TL;DR ¶ I’ve just released jub0bs/cors, a new CORS middleware library for Go, perhaps the best one yet. It has some advantages over the more popular rs/cors library, including a simpler API, better documentation, extensive configuration validation, a useful debug mode, stronger performance guarantees. Here is a representative example of client code: package main import ( "io" "log" "net/http" "github.com/jub0bs/cors" ) func main() { mux := http.NewServeMux() mux.HandleFunc("GET /hello", ha...| jub0bs.com
TL;DR ¶ In this post, I investigate why developers struggle with CORS and I derive Fearless CORS, a design philosophy for better CORS middleware libraries, which comprises the following twelve principles: Optimise for readability Strive for a simple and cohesive API Provide support for Private Network Access Categorise requests correctly Validate configuration and fail fast Treat CORS as a compilation target Provide no default configuration Do not preclude legitimate configurations Ease trou...| jub0bs.com
func Bool ¶| pkg.go.dev
func In ¶| pkg.go.dev
The backstory on a new function in the slices package of Go 1.22.| blog.carlana.net
func Clone ¶| pkg.go.dev
type ResponseRecorder ¶| pkg.go.dev
Learn what it is for and how to use the built-in recover() function| gosamples.dev
To exit an application in Go (Golang), use the 'os.Exit()' function from the 'os' package. It causes the program to terminate immediately| gosamples.dev
To repeat a string in Go (Golang), use the strings.Repeat() function. It multiplies the input string a specified number of times| gosamples.dev
Learn how to take the address of a literal, map value, or function return value| gosamples.dev
func ParseDir ¶| pkg.go.dev
type ClientConn ¶| pkg.go.dev
func Abs ¶| pkg.go.dev
Overview ¶| pkg.go.dev
type Client struct {| pkg.go.dev
func Base ¶| pkg.go.dev
type Reader ¶| pkg.go.dev
func FileExports ¶| pkg.go.dev
func AddInt32 ¶| pkg.go.dev
type AlertError ¶| pkg.go.dev
func AppendBool ¶| pkg.go.dev
type Map ¶| pkg.go.dev
type Conn ¶| pkg.go.dev
func Chdir ¶| pkg.go.dev
func FormatDirEntry ¶| pkg.go.dev
func Abs ¶| pkg.go.dev
func Clone ¶| pkg.go.dev
本文永久链接 - https://tonybai.com/2023/08/20/some-changes-in-go-1-21 美国时间2023年8月8日,Go团队在Go官博上正式发布了1.21版本! 早在今年4月末,我就撰写了文章《Go 1.21新特性前瞻》,对Go 1.21可能引| tonybai.com
func AfterFunc ¶| pkg.go.dev
func FreeOSMemory ¶| pkg.go.dev
func As ¶| pkg.go.dev
type URL ¶| pkg.go.dev
func Marshal ¶| pkg.go.dev
func BinarySearch ¶| pkg.go.dev
type Profile ¶| pkg.go.dev
func Copy ¶| pkg.go.dev
func Alignof ¶| pkg.go.dev
func DeepEqual ¶| pkg.go.dev
type Server ¶| pkg.go.dev
type Group ¶| pkg.go.dev
func Equal ¶| pkg.go.dev