diff --git a/errclass/errclass.go b/errclass/errclass.go index fe46190..4e3b9d9 100644 --- a/errclass/errclass.go +++ b/errclass/errclass.go @@ -10,7 +10,7 @@ with names resembling standard Unix error names. 1. Preserve original error in `err` in the structured logs. -2. Add the classified error as the `errclass` field. +2. Add the classified error as the `errClass` field. 3. Use [errors.Is] and [errors.As] for classification. diff --git a/netcore/conn.go b/netcore/conn.go index 27e4570..b14e0f6 100644 --- a/netcore/conn.go +++ b/netcore/conn.go @@ -96,7 +96,7 @@ func (c *connWrapper) Close() (err error) { c.ctx, "closeDone", slog.Any("err", err), - slog.String("errclass", errclass.New(err)), + slog.String("errClass", errclass.New(err)), slog.String("localAddr", c.laddr), slog.String("protocol", c.protocol), slog.String("remoteAddr", c.raddr), @@ -132,7 +132,7 @@ func (c *connWrapper) Read(buf []byte) (int, error) { "readDone", slog.Int("ioBytesCount", count), slog.Any("err", err), - slog.String("errclass", errclass.New(err)), + slog.String("errClass", errclass.New(err)), slog.String("localAddr", c.laddr), slog.String("protocol", c.protocol), slog.String("remoteAddr", c.raddr), @@ -183,7 +183,7 @@ func (c *connWrapper) Write(data []byte) (n int, err error) { "writeDone", slog.Int("ioBytesCount", count), slog.Any("err", err), - slog.String("errclass", errclass.New(err)), + slog.String("errClass", errclass.New(err)), slog.String("localAddr", c.laddr), slog.String("protocol", c.protocol), slog.String("remoteAddr", c.raddr), diff --git a/netcore/dialer.go b/netcore/dialer.go index b41258c..292a573 100644 --- a/netcore/dialer.go +++ b/netcore/dialer.go @@ -109,7 +109,7 @@ func (nx *Network) emitConnectDone(ctx context.Context, ctx, "connectDone", slog.Any("err", err), - slog.String("errclass", errclass.New(err)), + slog.String("errClass", errclass.New(err)), slog.String("localAddr", connLocalAddr(conn).String()), slog.String("protocol", network), slog.String("remoteAddr", address), diff --git a/netcore/resolver.go b/netcore/resolver.go index fca1043..a3f7c3e 100644 --- a/netcore/resolver.go +++ b/netcore/resolver.go @@ -97,7 +97,7 @@ func (nx *Network) emitLookupHostDone(ctx context.Context, slog.String("dnsLookupDomain", domain), slog.Any("dnsResolvedAddrs", addrs), slog.Any("err", err), - slog.String("errclass", errclass.New(err)), + slog.String("errClass", errclass.New(err)), slog.Time("t0", t0), slog.Time("t", nx.timeNow()), ) diff --git a/netcore/tlsdialer.go b/netcore/tlsdialer.go index 0610d2b..048530c 100644 --- a/netcore/tlsdialer.go +++ b/netcore/tlsdialer.go @@ -117,7 +117,7 @@ func (td *tlsDialer) emitTLSHandshakeDone(ctx context.Context, ctx, "tlsHandshakeDone", slog.Any("err", err), - slog.String("errclass", errclass.New(err)), + slog.String("errClass", errclass.New(err)), slog.String("localAddr", localAddr), slog.String("protocol", network), slog.String("remoteAddr", remoteAddr),