util

package
v0.0.0-...-3db07d3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstimateHttpHeadersSize

func EstimateHttpHeadersSize(headers http.Header) (result int64)

EstimateHttpHeadersSize had to create this because headers size was not counted

func MaxDuration

func MaxDuration(d1 time.Duration, d2 time.Duration) time.Duration

func MinDuration

func MinDuration(d1 time.Duration, d2 time.Duration) time.Duration

Types

type ByteSize

type ByteSize struct {
	Size float64
}

ByteSize a helper struct that implements the String() method and returns a human readable result. Very useful for %v formatting.

func (ByteSize) String

func (self ByteSize) String() string

type RedirectError

type RedirectError struct {
	// contains filtered or unexported fields
}

RedirectError specific error type that happens on redirection

func NewRedirectError

func NewRedirectError(message string) *RedirectError

func (*RedirectError) Error

func (self *RedirectError) Error() string

Jump to

Keyboard shortcuts

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