diff --git a/.vscode/settings.json b/.vscode/settings.json index 1bc0e6b..c8ee946 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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": [ - "gomore", - "stackless" - ] -} \ No newline at end of file + "Goroutines", + "Stateful", + "Structs", + "bber", + "crazybber", + "ifelse", + "iostream", + "istack", + "karlseguin", + "logrusorgru", + "mongodb", + "nums", + "postgres", + "stretchr", + "struct", + "xargs", + "gomore", + "stackless" + ], + } \ No newline at end of file diff --git a/structure/22_bridge/README.md b/structure/22_bridge/README.md index f7f1122..4073f65 100644 --- a/structure/22_bridge/README.md +++ b/structure/22_bridge/README.md @@ -2,6 +2,7 @@ 桥接模式分离抽象部分和实现部分。使得两部分独立扩展。 -桥接模式类似于策略模式,区别在于策略模式封装一系列算法使得算法可以互相替换。 +桥接模式类似于策略模式,原因在于他们都将行为交给了另一个接口实现,再组合实现 +区别在于策略模式封装一系列算法使得算法可以互相替换,关键点在于可以动态替换,但是桥接模式的特点是,一旦组合运行时一般不会发生变化. + -策略模式使抽象部分和实现部分分离,可以独立变化。