go-context-deadline-patterns
CommunityEnsure deadlines and cancellations are handled safely.
AuthorPremModhaOfficial
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill guides developers in implementing context-aware I/O methods that respect cancellation signals and deadlines, preventing resource leaks and ensuring safe concurrency.
Core Features & Use Cases
- Deadline Propagation: Implements patterns to respect existing deadlines and apply default timeouts when none are set, ensuring predictable operation timing.
- Cancellation Safety: Ensures resources are released with
defer cancel()and usesselectstatements to handlectx.Done(), avoiding goroutine leaks. - Use Case: When designing a network client or cleanup operation, apply these patterns to guarantee timely aborts under cancellation or timeout conditions.
Quick Start
Follow the pattern to probe ctx.Deadline(), derive timeouts with context.WithTimeout, and incorporate select statements to handle cancellations during delays or retries.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: go-context-deadline-patterns Download link: https://github.com/PremModhaOfficial/sdk-pipeline/archive/main.zip#go-context-deadline-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.