useragent

package
v3.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultUserAgent = "NoClient/0.0.1"
View Source
const DefaultVersion = "0.0.1"
View Source
const UnknownClient = "UnknownClient"

Variables

This section is empty.

Functions

func IsBigSurOrNewer

func IsBigSurOrNewer() bool

IsBigSurOrNewer checks whether the host is macOS BigSur 10.16.x or higher.

func IsCatalinaOrNewer

func IsCatalinaOrNewer() bool

IsCatalinaOrNewer checks whether the host is macOS Catalina 10.15.x or higher.

func IsVenturaOrNewer

func IsVenturaOrNewer() bool

IsVenturaOrNewer checks whether the host is macOS BigSur 13.x or higher.

Types

type UserAgent

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

func New

func New() *UserAgent

func (*UserAgent) GetClientString added in v3.2.0

func (ua *UserAgent) GetClientString() string

func (*UserAgent) GetUserAgent

func (ua *UserAgent) GetUserAgent() string

func (*UserAgent) HasClient

func (ua *UserAgent) HasClient() bool

func (*UserAgent) SetClient

func (ua *UserAgent) SetClient(name, version string)

func (*UserAgent) SetClientString added in v3.2.0

func (ua *UserAgent) SetClientString(client string)

func (*UserAgent) SetPlatform

func (ua *UserAgent) SetPlatform(platform string)

Jump to

Keyboard shortcuts

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