MCPcopy Index your code
hub / github.com/bytexlee/go-patterns

github.com/bytexlee/go-patterns @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
333 symbols 661 edges 57 files 112 documented · 34%
What it actually does AI analysis from the code graph — generated when you open this
loading…

Extension points exported contracts — how you extend this code

Visitor (Interface)
visitor 接口 [5 implementers]
15-visitor-pattern/visitor.go
Visitor (Interface)
创建Visitor接口 [5 implementers]
18-iterator-pattern/iterator.go
ActionState (Interface)
因为含有多种状态,状态类型不确定,这里需要声明State接口,多态原则 [4 implementers]
14-state-pattern/state.go
Expression (Interface)
定义接口表达式 [3 implementers]
26-interpreter-pattern/interpreter.go
Player (Interface)
音乐播放器 [2 implementers]
12-adapter-pattern/adapter.go
MenuComponent (Interface)
接下来实现Menu struct, Menu包含共同部分MenuDesc以及列表, 将列表部分分离出来 * MenuGroup, 这里引入接口MenuComponent, 因为child类型是不确定的 此外,由于接口为Menu和Menu [2 …
13-composite-pattern/composite.go
SoftWare (Interface)
抽象接口 [2 implementers]
21-bridge-pattern/bridge.go
IDepartment (Interface)
创建IDepartment接口 [2 implementers]
25-mediator-pattern/mediator.go

Core symbols most depended-on inside this repo

NewMenuItem
called by 7
13-composite-pattern/composite.go
Add
called by 6
13-composite-pattern/composite.go
NewPublisher
called by 6
27-publish-and-subscribe/pubsub.go
Subscribe
called by 6
27-publish-and-subscribe/pubsub.go
Name
called by 5
13-composite-pattern/composite.go
Close
called by 5
27-publish-and-subscribe/pubsub.go
Publish
called by 5
27-publish-and-subscribe/pubsub.go
Interpret
called by 5
26-interpreter-pattern/interpreter.go

Shape

Method 157
Struct 73
Function 69
Interface 23
TypeAlias 8
FuncType 3

Languages

Go100%

Modules by API surface

14-state-pattern/state.go23 symbols
13-composite-pattern/composite.go18 symbols
23-command-pattern/command.go17 symbols
07-observer-pattern/observer.go16 symbols
01-builder-patterns/builder.go15 symbols
26-interpreter-pattern/interpreter.go14 symbols
21-bridge-pattern/bridge.go14 symbols
18-iterator-pattern/iterator.go13 symbols
20-template-method-pattern/template_method.go12 symbols
25-mediator-pattern/mediator.go11 symbols
27-publish-and-subscribe/pubsub.go10 symbols
22-chain-of-responsibility-pattern/chain.go10 symbols

For agents

$ claude mcp add go-patterns \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact