เขียน Go แบบ Java/Ruby/PHP — ทางลัดสู่ Technical Debt โดยไม่รู้ตัว

go dev.to

เขียน Go แบบ Java/Ruby/PHP — ทางลัดสู่ Technical Debt โดยไม่รู้ตัว มีเรื่องเล่าใน community Go ว่าเคยมีคนเขียนโค้ดแบบนี้ส่งมาที่ code review: type UserGetterServiceInterface interface { GetUser(id string) (*User, error) } type UserGetterService struct { repo UserRepositoryInterface } func NewUserGetterService(repo UserRepositoryInterface) *UserGetterService { return &UserGetterService{repo: repo} } แล้วคนรีวิวถามว่า "พี่ครับ... อะไรคือ UserGetterServiceInterface

Read Full Tutorial open_in_new
arrow_back Back to Tutorials