go-context

Installation
SKILL.md

Go Context Usage

Context as First Parameter

Functions that use a Context should accept it as their first parameter:

func F(ctx context.Context, /* other arguments */) error
func ProcessRequest(ctx context.Context, req *Request) (*Response, error)

This is a strong convention in Go that makes context flow visible and consistent across codebases.


Don't Store Context in Structs

Related skills

More from cxuu/golang-skills

Installs
551
GitHub Stars
91
First Seen
Jan 27, 2026