mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 21:54:01 +03:00
removed unwanted log write
doctor logging per-ip
This commit is contained in:
@@ -50,6 +50,12 @@ var (
|
||||
tplEDCConnect = template.Must(
|
||||
template.New("").Parse(" ❌ DC {{ .dc }}: {{ .error }}\n"),
|
||||
)
|
||||
tplODCIPConnect = template.Must(
|
||||
template.New("").Parse(" ✅ {{ .ip }}\n"),
|
||||
)
|
||||
tplEDCIPConnect = template.Must(
|
||||
template.New("").Parse(" ❌ {{ .ip }}: {{ .error }}\n"),
|
||||
)
|
||||
|
||||
tplODNSSNIMatch = template.Must(
|
||||
template.New("").Parse(" ✅ IP address {{ .ip }} matches secret hostname {{ .hostname }}\n"),
|
||||
@@ -285,8 +291,15 @@ func (d *Doctor) checkNetworkAddresses(ntw mtglib.Network, addresses []string) e
|
||||
for _, addr := range checkAddresses {
|
||||
conn, err = ntw.DialContext(ctx, "tcp", addr)
|
||||
if err != nil {
|
||||
tplEDCIPConnect.Execute(os.Stdout, map[string]any{
|
||||
"error": err,
|
||||
"ip": addr,
|
||||
})
|
||||
continue
|
||||
}
|
||||
tplODCIPConnect.Execute(os.Stdout, map[string]any{
|
||||
"ip": addr,
|
||||
})
|
||||
|
||||
conn.Close() //nolint: errcheck
|
||||
|
||||
|
||||
Reference in New Issue
Block a user