• Miek Gieben's avatar
    middleware/metrics: fix crash on startup (#318) · db6c9a3f
    Miek Gieben authored
    Make the methods that handle Metrics all use pointer receivers to fix
    sync.Once not being initialized.
    
    Finish the setup_test to test for failures. And make the check for the
    address more strict and return an error when it does not have a port
    number.
    
    Add a toplevel test that starts a CoreDNS server with metrics enabled
    so we catch these errors in the future.
    db6c9a3f
setup_test.go 868 Bytes