useragent

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidAgent is returned when user agent is a zero-length string
	ErrInvalidAgent = errors.New("User Agent does not return valid user-agent string")
)

Functions

func Validate

func Validate(agent Agent) error

Validate validates the given user agent

Types

type Agent

type Agent interface {
	// GetString returns the user agent string to be used
	GetString() string
}

Agent represents a given user agent

Jump to

Keyboard shortcuts

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