Go

Use for modern Go work keyed to the project's Go version — `any` over `interface{}`, errors.Is / errors.Join, slices / maps / cmp packages (Contains, Index, SortFunc, Sorted, Collect, Clone, Copy, Keys, Values), sync.OnceFunc / OnceValue, context.AfterFunc / WithCancelCause, atomic.Bool / Int64 / Pointer[T], `for i := range n` loops, cmp.Or, http.ServeMux method-and-path patterns + r.PathValue, t.Context() in tests, omitzero JSON tags, b.Loop() benchmarks, strings.SplitSeq / FieldsSeq iterators, sync.WaitGroup wg.Go(fn), errors.AsType[T], `new(value)` pointer expressions. Read the matching reference before reviewing Go code for outdated patterns.

Jylhis a6ff9a5 12 files · 96.5 KB Updated

File contents

Jylhis/skills/tree/main/skills/languages/go commit a6ff9a529c

Frequently asked questions

npx skillmds@latest add jylhis/go