소스 정보
- 저장소
- pluginagentmarketplace/custom-plugin-go
- 최근 소스 활동
- 2025년 12월 30일 12:44
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-go --skill go-fundamentals명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | go-fundamentals |
| description | Core Go programming concepts - syntax, types, interfaces, error handling |
| sasmp_version | 1.3.0 |
| bonded_agent | 01-go-fundamentals |
| bond_type | PRIMARY_BOND |
Master core Go programming concepts for production-ready applications.
Comprehensive skill covering Go syntax, type system, interfaces, and idiomatic error handling patterns following Effective Go and Google Go Style Guide.
| 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 |
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
}
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
}
// 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
}
// 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 != nil {
if errors.Is(err, sql.ErrNoRows) {
return nil, ErrNotFound
}
return nil, fmt.Errorf("get user %d: %w", id, err)
}
return user, nil
}
// Custom error types
type ValidationError struct {
Field string
Message string
}
func (e *ValidationError) Error() string {
return fmt.Sprintf("%s: %s", e.Field, e.Message)
}
func withRetry[T any](fn func() (T, error), maxRetries int) (T, error) {
var zero T
backoff := 100 * time.Millisecond
for i := 0; i < maxRetries; i++ {
result, err := fn()
if err == nil {
return result, nil
}
if i < maxRetries-1 {
time.Sleep(backoff)
backoff *= 2
}
}
return zero, fmt.Errorf("max retries exceeded")
}
import "log/slog"
func ProcessRequest(ctx context.Context, req Request) error {
logger := slog.With(
"request_id", ctx.Value("request_id"),
"user_id", req.UserID,
)
logger.Info("processing request", "action", req.Action)
if err := validate(req); err != nil {
logger.Error("validation failed", "error", err)
return err
}
logger.Info("request processed successfully")
return nil
}
func TestUser_Validate(t *testing.T) {
tests := []struct {
name string
user User
wantErr bool
}{
{
name: "valid user",
user: User{Name: "John", Email: "john@example.com"},
wantErr: false,
},
{
name: "empty name",
user: User{Name: "", Email: "john@example.com"},
wantErr: true,
},
{
name: "invalid email",
user: User{Name: "John", Email: "invalid"},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := tt.user.Validate()
if (err != nil) != tt.wantErr {
t.Errorf("Validate() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
| Symptom | Cause | Fix |
|---|---|---|
nil pointer dereference | Uninitialized pointer | Check nil before use |
interface conversion panic | Wrong type assertion | Use comma-ok idiom |
import cycle | Circular dependencies | Extract to new package |
go vet ./... for static analysisgo build ./... for compilation checkSkill("go-fundamentals")