1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 04:22:22 +00:00
This commit is contained in:
Xargin 2018-06-09 19:40:44 +08:00
parent ee3236c7a7
commit 6e7f76d215

View File

@ -1,4 +1,9 @@
# 5.8. interface 和 web 编程
# 5.8. interface 和 table-driven 开发
在项目中我们有可能遇到这样的场景:公司内的基础架构因为技术实力原因,最早是从别人那里借来的 kv 存储方案。随着公司的发展,渐渐有大牛加入,想要甩掉这个借来的包袱自研 kv 存储,但接口与之前的 kv 存储不兼容。接入时需要业务改动接入代码,怎么写代码才能让我的核心业务逻辑不受这些外部资源变化影响呢。
## 使用 interface 来做抽象
## 要不要用继承?
## table-driven 开发