go-composition

Official

Go composition and extensibility

Authorgofhir
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses the complexities of extending existing types and combining behaviors in Go, offering robust solutions for building flexible and maintainable codebases.

Core Features & Use Cases

  • Struct Embedding: Inherit methods and fields from base types to build specialized structures.
  • Interface Embedding: Compose interfaces to create more complex contracts and enable flexible polymorphism.
  • Service Composition: Combine multiple services to achieve a unified functionality, handling fallback scenarios.
  • Decorator Pattern: Enhance existing handlers with additional logic like logging or authentication without modifying their core implementation.

Quick Start

Use the go-composition skill to understand how to embed a BaseValidator struct within a TerminologyValidator struct.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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-composition
Download link: https://github.com/gofhir/validator/archive/main.zip#go-composition

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.