From 20fe2e4cd87aa352dd4096dc15e6f270c2d4a2bf Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Tue, 29 Mar 2022 14:12:25 +0800 Subject: [PATCH] Chore: minor rename --- stats/connections.go | 2 +- stats/debug.go | 2 +- stats/server.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stats/connections.go b/stats/connections.go index c282bbf..59bd7fa 100644 --- a/stats/connections.go +++ b/stats/connections.go @@ -17,7 +17,7 @@ import ( const defaultInterval = 1000 func init() { - addMountPoint("/connections", connectionRouter()) + registerMountPoint("/connections", connectionRouter()) } func connectionRouter() http.Handler { diff --git a/stats/debug.go b/stats/debug.go index b209345..4989867 100644 --- a/stats/debug.go +++ b/stats/debug.go @@ -10,7 +10,7 @@ import ( ) func init() { - addMountPoint("/debug/pprof/", pprofRouter()) + registerMountPoint("/debug/pprof/", pprofRouter()) } func pprofRouter() http.Handler { diff --git a/stats/server.go b/stats/server.go index 29ea39a..ab843b7 100644 --- a/stats/server.go +++ b/stats/server.go @@ -28,7 +28,7 @@ var ( _mountPoints = make(map[string]http.Handler) ) -func addMountPoint(pattern string, handler http.Handler) { +func registerMountPoint(pattern string, handler http.Handler) { _mountPoints[pattern] = handler }