Files
Crimson-Gatekeeper/srv/cmd/tool/lab/pasture/sheep.go
des 4cab2f6ff3 更新自定义 DI 注入
我算是明白了,别说 go wire 了,勾八连 GO 这个语言能不能靠得住都挺难说的。既然如此,还是大胆一点吧。俗话说得好,所有让人难绷的细节都是为了宏观上的达成意图的方便。那就来吧。
2026-02-25 08:08:21 +08:00

14 lines
172 B
Go

package pasture
type Sheep struct {
lines string
}
func (s *Sheep) Sound() string {
return s.lines
}
func NewSheep(line string) *Sheep {
return &Sheep{lines: line}
}