修复golint

This commit is contained in:
lwch
2021-10-18 10:51:43 +08:00
parent bf9503d4cc
commit 36b5c0d35e
10 changed files with 64 additions and 57 deletions

View File

@@ -16,6 +16,7 @@ type Dashboard struct {
Version string
}
// New create dashboard object
func New(cfg *global.Configure, pl *pool.Pool, mgr *tunnel.Mgr, version string) *Dashboard {
return &Dashboard{
cfg: cfg,
@@ -25,6 +26,7 @@ func New(cfg *global.Configure, pl *pool.Pool, mgr *tunnel.Mgr, version string)
}
}
// ListenAndServe listen and serve http handler
func (db *Dashboard) ListenAndServe(addr string, port uint16) error {
mux := http.NewServeMux()
mux.HandleFunc("/api/info", db.Info)