AddRoutes adds route specifications to the server
(specs []string, notfound []string)
| 214 | |
| 215 | // AddRoutes adds route specifications to the server |
| 216 | func (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 |
| 228 | func (dd *Devd) AddIgnores(specs []string) error { |