mirror of
https://github.com/usual2970/certimate.git
synced 2025-07-30 06:04:29 +00:00
refactor(ui): clean code
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"math"
|
||||
"net"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -34,9 +35,9 @@ func (n *monitorNode) Process(ctx context.Context) error {
|
||||
|
||||
nodeCfg := n.node.GetConfigForMonitor()
|
||||
|
||||
targetAddr := fmt.Sprintf("%s:%d", nodeCfg.Host, nodeCfg.Port)
|
||||
targetAddr := net.JoinHostPort(nodeCfg.Host, fmt.Sprintf("%d", nodeCfg.Port))
|
||||
if nodeCfg.Port == 0 {
|
||||
targetAddr = fmt.Sprintf("%s:443", nodeCfg.Host)
|
||||
targetAddr = net.JoinHostPort(nodeCfg.Host, "443")
|
||||
}
|
||||
|
||||
targetDomain := nodeCfg.Domain
|
||||
|
Reference in New Issue
Block a user