errors

package
v2.679.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package errors provides HTTP-specific error helpers for go-service.

This package contains small helpers for classifying and normalizing HTTP-related errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServerError

func ServerError(err error) error

ServerError normalizes expected HTTP server shutdown errors.

The standard library returns http.ErrServerClosed from (*http.Server).Serve / ServeTLS when the server is shut down normally via (*http.Server).Shutdown or Close. In many go-service components this is not considered a real error and should not be surfaced as a startup/serve failure.

ServerError returns nil when err is http.ErrServerClosed, otherwise it returns err unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL