MCPcopy Index your code
hub / github.com/cortesi/devd / AddRoutes

Method AddRoutes

server.go:216–225  ·  view source on GitHub ↗

AddRoutes adds route specifications to the server

(specs []string, notfound []string)

Source from the content-addressed store, hash-verified

214
215// AddRoutes adds route specifications to the server
216func (dd *Devd) AddRoutes(specs []string, notfound []string) error {
217 dd.Routes = make(RouteCollection)
218 for _, s := range specs {
219 err := dd.Routes.Add(s, notfound)
220 if err != nil {
221 return fmt.Errorf("Invalid route specification: %s", err)
222 }
223 }
224 return nil
225}
226
227// AddIgnores adds log ignore patterns to the server
228func (dd *Devd) AddIgnores(specs []string) error {

Callers 2

TestDevdHandlerFunction · 0.95
mainFunction · 0.95

Calls 1

AddMethod · 0.80

Tested by 1

TestDevdHandlerFunction · 0.76