SYMBOL INDEX (229 symbols across 25 files) FILE: main.go function main (line 7) | func main() { FILE: pattern/AbstractFactory.go type AbstractFactory (line 5) | type AbstractFactory interface type PencilFactory (line 9) | type PencilFactory struct method Produce (line 12) | func (PencilFactory) Produce() pen { type BrushPen (line 16) | type BrushPen struct method Produce (line 19) | func (BrushPen) Produce() pen { FILE: pattern/Adapter.go type NonRechargeableBattery (line 16) | type NonRechargeableBattery interface type RechargeableBattery (line 21) | type RechargeableBattery interface type NonRechargeableA (line 27) | type NonRechargeableA struct method Use (line 30) | func (NonRechargeableA) Use() { type AdapterNonToYes (line 42) | type AdapterNonToYes struct method Charge (line 46) | func (AdapterNonToYes) Charge() { type RechargeableBatteryAbstract (line 53) | type RechargeableBatteryAbstract struct method Use (line 56) | func (RechargeableBatteryAbstract) Use() { method Charge (line 59) | func (RechargeableBatteryAbstract) Charge() { type NonRechargeableB (line 63) | type NonRechargeableB struct method Use (line 67) | func (NonRechargeableB) Use() { function AdapterTest (line 72) | func AdapterTest() { FILE: pattern/Bridge.go type Request (line 15) | type Request interface type Client (line 20) | type Client struct method Query (line 24) | func (c *Client) Query(req Request) (resp *http.Response, err error) { type CdnRequest (line 30) | type CdnRequest struct method HttpRequest (line 33) | func (cdn *CdnRequest) HttpRequest() (*http.Request, error) { type LiveRequest (line 37) | type LiveRequest struct method HttpRequest (line 40) | func (cdn *LiveRequest) HttpRequest() (*http.Request, error) { function TestBridge (line 44) | func TestBridge() { FILE: pattern/Builder.go constant FOOD (line 4) | FOOD = "food" constant DRINK (line 5) | DRINK = "drink" type Item (line 8) | type Item interface type Food (line 15) | type Food struct method Price (line 18) | func (Food) Price() float32 { method Name (line 21) | func (Food) Name() string { method Category (line 24) | func (Food) Category() string { type Drink (line 29) | type Drink struct method Price (line 32) | func (Drink) Price() float32 { method Name (line 35) | func (Drink) Name() string { method Category (line 38) | func (Drink) Category() string { type Hamburger (line 43) | type Hamburger struct method Price (line 47) | func (Hamburger) Price() float32 { method Name (line 50) | func (Hamburger) Name() string { type FriedChicken (line 55) | type FriedChicken struct method Price (line 59) | func (FriedChicken) Price() float32 { method Name (line 62) | func (FriedChicken) Name() string { type Cola (line 67) | type Cola struct method Price (line 71) | func (Cola) Price() float32 { method Name (line 74) | func (Cola) Name() string { type Beer (line 79) | type Beer struct method Price (line 83) | func (Beer) Price() float32 { method Name (line 86) | func (Beer) Name() string { type Meal (line 90) | type Meal method AddItem (line 92) | func (this *Meal) AddItem(item ...Item) { method GetCost (line 96) | func (this Meal) GetCost() (cost float32) { method ShowItems (line 102) | func (this Meal) ShowItems() (msg string) { type MealBuilder (line 110) | type MealBuilder struct method MealOne (line 113) | func (MealBuilder) MealOne() (meal *Meal) { FILE: pattern/ChainOfResponsibility.go type ScreenEvent (line 12) | type ScreenEvent struct type IScreenEventHandler (line 17) | type IScreenEventHandler interface type AbsScreenEventHandler (line 22) | type AbsScreenEventHandler struct method Handle (line 26) | func(ase *AbsScreenEventHandler)Handle(se *ScreenEvent)bool{ method SetNextHandler (line 33) | func(ase *AbsScreenEventHandler)SetNextHandler(ise IScreenEventHandler){ type HomeScreenEventHandler (line 37) | type HomeScreenEventHandler struct method Handle (line 41) | func(hse *HomeScreenEventHandler)Handle(se *ScreenEvent)bool{ type UserScreenEventHandler (line 50) | type UserScreenEventHandler struct method Handle (line 54) | func(use *UserScreenEventHandler)Handle(se *ScreenEvent)bool{ function ChainOfResponsibilityTest (line 63) | func ChainOfResponsibilityTest(){ FILE: pattern/Command.go type Command (line 15) | type Command interface type GetCommand (line 20) | type GetCommand struct method Do (line 23) | func (gc *GetCommand) Do(args interface{}) (interface{}, error) { type PostCommand (line 29) | type PostCommand struct method Do (line 32) | func (pc *PostCommand) Do(args interface{}) (interface{}, error) { type CmdContext (line 38) | type CmdContext struct type CommandHandler (line 44) | type CommandHandler struct method Handle (line 49) | func (ch *CommandHandler) Handle(ctx *CmdContext) (interface{}, error) { method Register (line 61) | func (ch *CommandHandler) Register(cmdType string, cmd Command) { function CommandTest (line 66) | func CommandTest() { FILE: pattern/Composite.go type Department (line 9) | type Department struct method Add (line 17) | func (this *Department) Add(departments ...*Department) { method AddTo (line 24) | func (this *Department) AddTo(parent *Department) { method add (line 30) | func (this *Department) add(department *Department) { method Find (line 35) | func (this *Department) Find(id string) (department *Department) { method Remove (line 50) | func (this *Department) Remove(id string) (department *Department) { method ReadList (line 66) | func (this *Department) ReadList() { function CompositeTest (line 74) | func CompositeTest() { FILE: pattern/Decorator.go type MessageBuilder (line 15) | type MessageBuilder interface type BaseMessageBuilder (line 20) | type BaseMessageBuilder struct method Build (line 24) | func(b *BaseMessageBuilder)Build(messages ... string) string{ type QuoteMessageBuilderDecorator (line 29) | type QuoteMessageBuilderDecorator struct method Build (line 33) | func(q *QuoteMessageBuilderDecorator)Build(messages ... string) string{ type BraceMessageBuilderDecorator (line 39) | type BraceMessageBuilderDecorator struct method Build (line 43) | func(b *BraceMessageBuilderDecorator)Build(messages ... string) string{ type Object (line 51) | type Object function LogDecorate (line 53) | func LogDecorate(fn Object) Object { function Double (line 65) | func Double(n int) int { function DecoratorTest (line 71) | func DecoratorTest(){ FILE: pattern/Facade.go type Coder (line 10) | type Coder struct method Coding (line 13) | func (c *Coder) Coding() { type Tester (line 17) | type Tester struct method Testing (line 20) | func (t *Tester) Testing() { type ProductPlanner (line 24) | type ProductPlanner struct method Planing (line 27) | func (p *ProductPlanner) Planing() { type MaintenancePeople (line 31) | type MaintenancePeople struct method Releasing (line 34) | func (m *MaintenancePeople) Releasing() { type Company (line 42) | type Company struct method Producing (line 51) | func (com *Company) Producing() { function FacadeTest (line 68) | func FacadeTest() { FILE: pattern/Factory.go type pen (line 8) | type pen interface type pencil (line 13) | type pencil struct method Write (line 16) | func (p *pencil) Write() { type brushPen (line 20) | type brushPen struct method Write (line 23) | func (p *brushPen) Write() { type PenFactory (line 28) | type PenFactory struct method Produce (line 31) | func (this PenFactory) Produce(typ string) pen { method ProducePencil (line 42) | func (PenFactory) ProducePencil() pen { method ProduceBrushPen (line 46) | func (PenFactory) ProduceBrushPen() pen { FILE: pattern/Flyweight.go type DbConnectPool (line 14) | type DbConnectPool struct method Get (line 22) | func(dc *DbConnectPool) Get()*DbConnect{ method Put (line 31) | func(dc *DbConnectPool) Put(conn *DbConnect){ function NewDbConnectPool (line 18) | func NewDbConnectPool(chanLen int)*DbConnectPool{ type DbConnect (line 42) | type DbConnect struct method Do (line 46) | func (*DbConnect) Do(){ function FlyweightTest (line 51) | func FlyweightTest(){ FILE: pattern/Interpreter.go type Expression (line 16) | type Expression interface type TerminalExpression (line 20) | type TerminalExpression struct method Interpret (line 25) | func(te *TerminalExpression)Interpret(context string) bool{ type OrExpression (line 33) | type OrExpression struct method Interpret (line 38) | func(oe *OrExpression)Interpret(context string) bool{ type AndExpression (line 43) | type AndExpression struct method Interpret (line 48) | func(ae *AndExpression )Interpret(context string) bool{ function InterpreterTest (line 52) | func InterpreterTest(){ FILE: pattern/Iterator.go type Iterator (line 10) | type Iterator interface type Container (line 16) | type Container interface type ArrayIterator (line 21) | type ArrayIterator struct method HasNext (line 26) | func (ai *ArrayIterator) HasNext() bool { method Next (line 33) | func (ai *ArrayIterator) Next() interface{} { type ArrayContainer (line 43) | type ArrayContainer struct method GetIterator (line 47) | func (ac *ArrayContainer) GetIterator() Iterator { function IteratorTest (line 52) | func IteratorTest(){ FILE: pattern/Mediator.go type ChatRoom (line 10) | type ChatRoom struct method SendMsg (line 14) | func (cr *ChatRoom)SendMsg(msg string){ method RegisterUser (line 17) | func (cr *ChatRoom)RegisterUser(u *User){ type User (line 21) | type User struct method SendMsg (line 26) | func (u *User)SendMsg(msg string){ function MediatorTest (line 32) | func MediatorTest(){ FILE: pattern/Memento.go type Text (line 15) | type Text struct method Write (line 20) | func (t *Text) Write(value string) { method Read (line 25) | func (t *Text) Read() string { method SaveToMemento (line 30) | func (t *Text) SaveToMemento() *Memento { method RestoreFromMemento (line 35) | func (t *Text) RestoreFromMemento(m *Memento) { type Memento (line 43) | type Memento struct type Storage (line 48) | type Storage struct method RPop (line 54) | func (s *Storage)RPop()*list.Element{ function MementoTest (line 63) | func MementoTest(){ FILE: pattern/Observer.go type Observer (line 11) | type Observer interface type Subject (line 15) | type Subject struct method SetState (line 20) | func (s *Subject)SetState(state string) { method Attach (line 24) | func (s *Subject)Attach(observer ... Observer) { method NotifyAllObservers (line 28) | func (s *Subject)NotifyAllObservers() { type AObserver (line 34) | type AObserver struct method Notify (line 38) | func (ao *AObserver)Notify(sub interface{}) { function ObserverTest (line 42) | func ObserverTest() { FILE: pattern/Prototype.go type Cloneable (line 15) | type Cloneable interface type Context (line 19) | type Context struct method Clone (line 22) | func (this *Context) Clone() interface{} { method string (line 28) | func (this *Context) string(typ interface{}) (str string) { type Context1 (line 39) | type Context1 struct method SetUri (line 44) | func (this *Context1) SetUri(uri string) { method String (line 48) | func (this *Context1) String() (str string) { type Context2 (line 52) | type Context2 struct method SetEcho (line 57) | func (this *Context2) SetEcho(echo string) { method String (line 61) | func (this *Context2) String() (str string) { type ContextPool (line 66) | type ContextPool method AddContext (line 68) | func (this *ContextPool) AddContext(key string, val *Context) { method GetContext (line 72) | func (this *ContextPool) GetContext(key string) *Context { FILE: pattern/Proxy.go type Device (line 20) | type Device interface type HardDisk (line 25) | type HardDisk struct method Read (line 29) | func(h *HardDisk)Read()([]byte,error){ method Write (line 32) | func(h *HardDisk)Write(word []byte)error{ type HardDiskProxy (line 37) | type HardDiskProxy struct method Read (line 42) | func(h *HardDiskProxy)Read()([]byte,error){ method Write (line 48) | func(h *HardDiskProxy)Write(word []byte)error{ method permission (line 56) | func(h *HardDiskProxy)permission(tag string)bool{ function ProxyTest (line 72) | func ProxyTest(){ FILE: pattern/Singleton.go type Singleton (line 5) | type Singleton interface type singleton (line 9) | type singleton struct method SaySomething (line 12) | func (singleton) SaySomething() { function NewSingletonInstance (line 18) | func NewSingletonInstance() Singleton { FILE: pattern/Singleton2.go type Singleton2 (line 10) | type Singleton2 interface type singleton2 (line 14) | type singleton2 struct method SaySomething (line 17) | func (singleton2) SaySomething() { function init (line 23) | func init() { function Singleton2SaySomething (line 27) | func Singleton2SaySomething() { FILE: pattern/State.go type Light (line 16) | type Light struct method PressSwitch (line 20) | func(l *Light)PressSwitch(){ type LightState (line 27) | type LightState interface type OnLightState (line 32) | type OnLightState struct method PressSwitch (line 37) | func(ols *OnLightState)PressSwitch(light *Light){ type OffLightState (line 43) | type OffLightState struct method PressSwitch (line 48) | func(ols *OffLightState)PressSwitch(light *Light){ function StateTest (line 54) | func StateTest(){ FILE: pattern/Strategy.go type Strategy (line 13) | type Strategy interface type AToB (line 18) | type AToB struct method Do (line 25) | func(ab *AToB) Do(){ type BikeStrategy (line 31) | type BikeStrategy struct method Do (line 35) | func(bs *BikeStrategy) Do(ab interface{}){ type BusStrategy (line 43) | type BusStrategy struct method Do (line 47) | func(bs *BusStrategy) Do(ab interface{}){ type AirStrategy (line 55) | type AirStrategy struct method Do (line 59) | func(as *AirStrategy) Do(ab interface{}){ function StrategyTest (line 67) | func StrategyTest(){ FILE: pattern/Template.go type Game (line 9) | type Game interface type AbsGame (line 15) | type AbsGame struct method Start (line 19) | func(ag *AbsGame)Start(){ method Playing (line 22) | func(ag *AbsGame)Playing(){ method End (line 25) | func(ag *AbsGame)End(){ type FootBall (line 29) | type FootBall struct method Playing (line 33) | func(fb *FootBall)Playing(){ type Cricket (line 37) | type Cricket struct method Playing (line 41) | func(fb *Cricket )Playing(){ function RunGame (line 45) | func RunGame(g Game){ function TemplateTest (line 51) | func TemplateTest(){ FILE: pattern/Visitor.go type Visitor (line 14) | type Visitor interface type DataStruct (line 18) | type DataStruct interface type ABData (line 23) | type ABData struct method Accept (line 27) | func (as *ABData)Accept(vi Visitor){ type AddVisitor (line 31) | type AddVisitor struct method Visit (line 35) | func (av *AddVisitor)Visit(dataS DataStruct){ type SubVisitor (line 41) | type SubVisitor struct method Visit (line 45) | func (sv *SubVisitor)Visit(dataS DataStruct){ function VisitorTest (line 51) | func VisitorTest(){