add setting & update README

This commit is contained in:
Edward 2020-04-28 14:43:58 +08:00
parent d80bb36a59
commit 1cca759c5d
2 changed files with 52 additions and 6 deletions

49
.vscode/settings.json vendored
View File

@ -1,6 +1,51 @@
{ {
"editor.tabSize": 2,
"extensions.ignoreRecommendations": true,
"workbench.colorCustomizations": {
"activityBar.background": "#759570",
"activityBar.activeBorder": "#cfd3ef",
"activityBar.foreground": "#e7e7e7",
"activityBar.hoverBackground": "#352cea",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#cfd3ef",
"activityBarBadge.foreground": "#15202b",
"titleBar.activeBackground": "#5e7959",
"titleBar.inactiveBackground": "#5e795999",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveForeground": "#e7e7e799",
"statusBarItem.hoverBackground": "#352cea",
"statusBar.foreground": "#e7e7e7",
"panel.border": "#759570",
"sideBar.border": "#759570",
"editorGroup.border": "#759570"
},
"go.languageServerFlags": [],
"go.lintOnSave": "file",
"go.vetOnSave": "package",
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.testFlags": ["-v"],
"go.testTimeout": "10s",
"go.formatTool": "goimports",
"cSpell.allowCompoundWords": true,
"editor.codeActionsOnSave": {"source.organizeImports": true},
"cSpell.words": [ "cSpell.words": [
"Goroutines",
"Stateful",
"Structs",
"bber",
"crazybber",
"ifelse",
"iostream",
"istack",
"karlseguin",
"logrusorgru",
"mongodb",
"nums",
"postgres",
"stretchr",
"struct",
"xargs",
"gomore", "gomore",
"stackless" "stackless"
] ],
} }

View File

@ -2,6 +2,7 @@
桥接模式分离抽象部分和实现部分。使得两部分独立扩展。 桥接模式分离抽象部分和实现部分。使得两部分独立扩展。
桥接模式类似于策略模式,区别在于策略模式封装一系列算法使得算法可以互相替换。 桥接模式类似于策略模式,原因在于他们都将行为交给了另一个接口实现,再组合实现
区别在于策略模式封装一系列算法使得算法可以互相替换,关键点在于可以动态替换,但是桥接模式的特点是,一旦组合运行时一般不会发生变化.
策略模式使抽象部分和实现部分分离,可以独立变化。