Help us shape the future of Go! Take the 2026 Go Developer Survey

retryafter

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package retryafter parses HTTP Retry-After values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(v string, now time.Time, limit time.Duration) (time.Duration, bool)

Parse reads a Retry-After value, either delay-seconds or an HTTP-date, relative to now. It reports false for an empty, malformed or negative value, and for a date that is not in the future (usually clock skew), so callers apply their own default. A positive limit caps the delay: a huge value neither overflows nor pauses the caller for longer than it allows.

Types

This section is empty.

Jump to

Keyboard shortcuts

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