github.com/bhameyie/otto@v0.2.1-0.20160406174117-16052efa52ec/helper/router/context.go (about) 1 package router 2 3 import ( 4 "github.com/hashicorp/otto/ui" 5 ) 6 7 // simpleContext is an implementation of Context for returning fixed values. 8 type simpleContext struct { 9 Name string 10 Args []string 11 UIVal ui.Ui 12 } 13 14 func (c *simpleContext) RouteName() string { return c.Name } 15 func (c *simpleContext) RouteArgs() []string { return c.Args } 16 func (c *simpleContext) UI() ui.Ui { return c.UIVal }