summaryrefslogtreecommitdiffhomepage
path: root/admin.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2019-05-21 14:22:21 -0600
committerMatthew Holt <[email protected]>2019-05-21 14:22:21 -0600
commit2fd98cb040b617d2a018ae00a3a68b320de7dbc6 (patch)
tree91de4d369ec2a94c8f4fc3de4ba256945ad50297 /admin.go
parent67d32e6779b8e4f67fb0902b06210596371ead7f (diff)
downloadcaddy-2fd98cb040b617d2a018ae00a3a68b320de7dbc6.tar.gz
caddy-2fd98cb040b617d2a018ae00a3a68b320de7dbc6.zip
Module.New() does not need to return an error
Diffstat (limited to 'admin.go')
-rw-r--r--admin.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/admin.go b/admin.go
index a123a64f1..b3d012b08 100644
--- a/admin.go
+++ b/admin.go
@@ -42,11 +42,7 @@ func StartAdmin(addr string) error {
///// END PPROF STUFF //////
for _, m := range GetModules("admin") {
- moduleValue, err := m.New()
- if err != nil {
- return fmt.Errorf("initializing module '%s': %v", m.Name, err)
- }
- route := moduleValue.(AdminRoute)
+ route := m.New().(AdminRoute)
mux.Handle(route.Pattern, route)
}