原书出处
Cloud Native Go (Matthew A. Titmus)
08 Loose Coupling
More commonly you’ll see some kind of “factory” function11 that’s used by the initializing function. While this still requires code changes to add adapters, they’re isolated to a single, easily-modified location. A more sophisticated approach might use accept a parameter or configuration value to choose which adapter to use. An example of a TransactionLogger factory
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch08.xhtml
EPUB SHA-256:1154caa7b61465daf957a7d8f1350ef24ab5db9c850cab5987aae5bc74986022