Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →loulanyue/golang-patterns
堅牢で効率的かつ保守可能なGoアプリケーションを構築するための慣用的なGoパターン、ベストプラクティス、規約。
Passed 0 of 22 test cases with the skill, and 22 of 22 without it.
0 fixed21 passed either way0 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
The instructions your model reads when the skill loads.
用於建構穩健、高效且可維護應用程式的慣用 Go 模式和最佳實務。
Go 偏好簡單而非聰明。程式碼應該明顯且易讀。
// 良好:清晰直接
func GetUser(id string) (*User, error) {
user, err := db.FindUser(id)
if err != nil {
return nil, fmt.Errorf("get user %s: %w", id, err)
}
return user, nil
}
// 不良:過於聰明
func GetUser(id string) (*User, error) {
return func() (*User, error) {
if u, e := db.FindUser(id); e == nil {
return u, nil
} else {
return nil, e
}
}()
}
test cases passed, vs 22 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.