- Hands-On Dependency Injection in Go
- Corey Scott
- 145字
- 2021-06-10 19:17:45
Leave your baggage at the door
If you were to ask me what is the most frequent mistake new Go programmers make?, I would not hesitate to tell you that it's bringing other language patterns into Go. I know this was my biggest early mistake. My first Go service looked like a Java app written in Go. Not only was the result subpar but it was rather painful, particularly while I was trying to achieve things such as inheritance. I've had a similar experience programming Go in a functional style, as you might see in Node.js.
In short, please don't do it. Re-read Effective Go and Go blogs as often as you need to until you find yourself using small interfaces, firing off Go routines without reservation, loving channels, and wondering why you ever needed more than composition to achieve nice polymorphism.
- 極簡算法史:從數學到機器的故事
- JavaScript Unlocked
- Dependency Injection in .NET Core 2.0
- 21天學通C++(第6版)
- Python 3破冰人工智能:從入門到實戰
- Mastering KnockoutJS
- MySQL數據庫基礎實例教程(微課版)
- The HTML and CSS Workshop
- Clojure Reactive Programming
- MATLAB for Machine Learning
- 微服務架構深度解析:原理、實踐與進階
- C語言程序設計
- Learning Splunk Web Framework
- 現代C:概念剖析和編程實踐
- UX Design for Mobile