mirror of
https://github.com/crazybber/go-pattern-examples.git
synced 2024-11-22 11:56:03 +03:00
add setting & update README
This commit is contained in:
parent
d80bb36a59
commit
1cca759c5d
47
.vscode/settings.json
vendored
47
.vscode/settings.json
vendored
@ -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": [
|
||||
"Goroutines",
|
||||
"Stateful",
|
||||
"Structs",
|
||||
"bber",
|
||||
"crazybber",
|
||||
"ifelse",
|
||||
"iostream",
|
||||
"istack",
|
||||
"karlseguin",
|
||||
"logrusorgru",
|
||||
"mongodb",
|
||||
"nums",
|
||||
"postgres",
|
||||
"stretchr",
|
||||
"struct",
|
||||
"xargs",
|
||||
"gomore",
|
||||
"stackless"
|
||||
]
|
||||
],
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
|
||||
桥接模式分离抽象部分和实现部分。使得两部分独立扩展。
|
||||
|
||||
桥接模式类似于策略模式,区别在于策略模式封装一系列算法使得算法可以互相替换。
|
||||
桥接模式类似于策略模式,原因在于他们都将行为交给了另一个接口实现,再组合实现
|
||||
区别在于策略模式封装一系列算法使得算法可以互相替换,关键点在于可以动态替换,但是桥接模式的特点是,一旦组合运行时一般不会发生变化.
|
||||
|
||||
|
||||
策略模式使抽象部分和实现部分分离,可以独立变化。
|
||||
|
Loading…
Reference in New Issue
Block a user