Menu

#Func

35 posts

Feed·
20 of 35 posts
Go 1.27 Ships a uuid Package. Dropping google/uuid Takes 4 Steps and One NULL Catch
📰
0Read More

Go 1.27 Ships a uuid Package. Dropping google/uuid Takes 4 Steps and One NULL Catch

DEV Community: go·Gabriel Anhaia·2 days ago
#BGnlV34s
#devtogo#devto#dev#uuid#order

Go 1.27 adds uuid to the standard library. Migrate off google/uuid in 4 steps, sort with NewV7, and handle the NULL scan that now errors.

15s
Unlag Neo: Macbook Neo Cursor lag "fix"
🖼️
229Read More

Unlag Neo: Macbook Neo Cursor lag "fix"

Hacker News·4 months ago
#f6dxnkhS
#gist#selector#return#func#else

Unlag Neo: Macbook Neo Cursor lag "fix". GitHub Gist: instantly share code, notes, and snippets.

15s
Golang Design Patterns: Creational Patterns
🖼️
0Read More

Golang Design Patterns: Creational Patterns

DEV Community: go·Cem AKAN·5 months ago
#AOep0xTM
#dev#return#struct#pizza#func

Hello, Go enthusiasts. Welcome to the first installment of our deep dive into Golang Design...

15s
Golang Design Patterns: Structural Patterns.
🖼️
0Read More

Golang Design Patterns: Structural Patterns.

DEV Community: go·Cem AKAN·5 months ago
#KyZ7XkaN
#dev#func#type#string#struct

Welcome back, Gophers ❤ In the first part of this series, we mastered the art of creation learning...

15s
Golang Design Patterns: Behavioral Patterns
🖼️
0Read More

Golang Design Patterns: Behavioral Patterns

DEV Community: go·Cem AKAN·5 months ago
#znmgOnoa
#dev#func#type#struct#pattern

Welcome back, Gophers ❤. If you’ve followed along from our previous dives, you know that building a...

15s
Concurrency Is Not Parallelism — And Go Knows the Difference
🖼️
0Read More

Concurrency Is Not Parallelism — And Go Knows the Difference

DEV Community·Kuba·5 months ago
#HBZB19kf
#why#go#webdev#goroutines#func

I build backend systems for a living. Most of what I ship runs on NestJS — TypeScript, async/await,...

15s
Go's net/http Server.Shutdown: The Three-Stage Drain You Probably Skip
🖼️
0Read More

Go's net/http Server.Shutdown: The Three-Stage Drain You Probably Skip

DEV Community·Gabriel Anhaia·6 months ago
#2DXPQ7VX
#stage#go#http#shutdown#context

Server.Shutdown is three stages, not one. The WebSocket trap, the background-goroutine trap, and the production drain pattern with errgroup.

15s
Sub-tests Done Right: t.Run, t.Parallel, and the Cleanup-Order Trap
🖼️
0Read More

Sub-tests Done Right: t.Run, t.Parallel, and the Cleanup-Order Trap

DEV Community·Gabriel Anhaia·6 months ago
#zv6eOd0f
#rule#go#testing#concurrency#parallel

t.Run + t.Parallel + t.Cleanup interact in ways most Go devs miss. Three cleanup-order rules and the table-test loop-capture trap.

15s
sync.OnceFunc, OnceValue, OnceValues: When Each Beats sync.Once
🖼️
0Read More

sync.OnceFunc, OnceValue, OnceValues: When Each Beats sync.Once

DEV Community·Gabriel Anhaia·6 months ago
#LC3Cy0Cn
#concurrency#go#stdlib#once#sync

Go 1.21's sync.OnceFunc / OnceValue / OnceValues vs sync.Once. When each is the cleanest, the error-return trap, init patterns.

15s
A Custom http.RoundTripper Is the Cleanest Place for Cross-Cutting HTTP Concerns
🖼️
0Read More

A Custom http.RoundTripper Is the Cleanest Place for Cross-Cutting HTTP Concerns

DEV Community·Gabriel Anhaia·6 months ago
#zWwaVELi
#go#http#architecture#backend#request

http.RoundTripper is the right place for HTTP cross-cutting concerns. Composition pattern, wrap order, body-drain gotchas.

15s
Go Race Detector Output: 3 Stack Shapes That Mean Different Things
🖼️
0Read More

Go Race Detector Output: 3 Stack Shapes That Mean Different Things

DEV Community·Gabriel Anhaia·6 months ago
#St6bCgQq
#shape#go#concurrency#testing#race

Go race detector output, decoded. Three real stack shapes (map race, loop-capture, interface pointer) and the fix that matches each.

15s
errgroup vs WaitGroup vs Channels: Pick the Right Concurrency Primitive
🖼️
0Read More

errgroup vs WaitGroup vs Channels: Pick the Right Concurrency Primitive

DEV Community·Gabriel Anhaia·6 months ago
#zVlKAzBI
#case#go#concurrency#error#errgroup

Three Go concurrency primitives, three different jobs. A decision matrix with runnable code for fan-out, fail-fast, and back-pressure.

15s
A Lock-Free Counter in Go: atomic, sync.Map, or Just a Mutex?
🖼️
0Read More

A Lock-Free Counter in Go: atomic, sync.Map, or Just a Mutex?

DEV Community·Gabriel Anhaia·6 months ago
#ZJglIYZe
#when#go#concurrency#atomic#int64

Three Go counters under contention. atomic wins for one hot counter. mutex is fine for batched updates. sync.Map almost never earns its keep.

15s
A Worker Pool That Actually Drains on Shutdown: A Pattern for Go Services
🖼️
0Read More

A Worker Pool That Actually Drains on Shutdown: A Pattern for Go Services

DEV Community·Gabriel Anhaia·6 months ago
#YOvMFRa7
#go#backend#architecture#software#context

defer wg.Wait() works for clean exits and falls apart on SIGTERM mid-flight. Here is a 60-line pool that drains in-flight work with a deadline.

15s