Core Go programming concepts - syntax, types, interfaces, error handling
View on GitHubpluginagentmarketplace/custom-plugin-go
go-development-assistant
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-go/blob/main/skills/go-fundamentals/SKILL.md -a claude-code --skill go-fundamentalsInstallation paths:
.claude/skills/go-fundamentals/# Go Fundamentals Skill
Master core Go programming concepts for production-ready applications.
## Overview
Comprehensive skill covering Go syntax, type system, interfaces, and idiomatic error handling patterns following Effective Go and Google Go Style Guide.
## Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| topic | string | yes | - | Topic to learn: "types", "interfaces", "errors", "packages" |
| level | string | no | "intermediate" | Skill level: "beginner", "intermediate", "advanced" |
| include_examples | bool | no | true | Include code examples |
## Validation Rules
```go
func ValidateRequest(req SkillRequest) error {
validTopics := []string{"types", "interfaces", "errors", "packages", "structs"}
if !slices.Contains(validTopics, req.Topic) {
return fmt.Errorf("invalid topic %q: must be one of %v", req.Topic, validTopics)
}
return nil
}
```
## Core Topics
### Types & Structs
```go
type User struct {
ID int64 `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Email string `json:"email" db:"email"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
func (u *User) Validate() error {
if u.Name == "" {
return errors.New("name is required")
}
if !strings.Contains(u.Email, "@") {
return errors.New("invalid email format")
}
return nil
}
```
### Interface Design
```go
// Small, focused interfaces
type Reader interface {
Read(p []byte) (n int, err error)
}
type Writer interface {
Write(p []byte) (n int, err error)
}
// Composition over inheritance
type ReadWriter interface {
Reader
Writer
}
```
### Error Handling
```go
// Sentinel errors
var (
ErrNotFound = errors.New("not found")
ErrUnauthorized = errors.New("unauthorized")
)
// Error wrapping with context
func GetUser(id int64) (*User, error) {
user, err := db.FindByID(id)
if err !