utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUpdate

func CheckUpdate() (*selfupdate.Release, bool)

func CopyToClipboard

func CopyToClipboard(text string)

func DoUpdate

func DoUpdate(latest *selfupdate.Release)

func ForkExec

func ForkExec() error

func OpenBrowser

func OpenBrowser(url string)

func SetupLogging

func SetupLogging()

func Version

func Version() string

func VersionInfo added in v0.5.2

func VersionInfo() goversioninfo.VersionInfo

Types

type Idler

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

func NewIdler

func NewIdler(idleTimeout time.Duration, invoke func()) Idler

func (*Idler) Call

func (i *Idler) Call()

type JSONTime

type JSONTime time.Time

func (JSONTime) MarshalJSON

func (t JSONTime) MarshalJSON() ([]byte, error)

func (JSONTime) String

func (t JSONTime) String() string

func (*JSONTime) UnmarshalJSON

func (t *JSONTime) UnmarshalJSON(s []byte) (err error)

type RLHTTPClient

type RLHTTPClient struct {
	RateLimiter *rate.Limiter
	// contains filtered or unexported fields
}

RLHTTPClient Rate Limited HTTP Client.

func NewRateLimitedClient

func NewRateLimitedClient(rl *rate.Limiter) *RLHTTPClient

NewRateLimitedClient return http client with a rateLimiter.

func (*RLHTTPClient) Do

func (c *RLHTTPClient) Do(req *http.Request, activationCallback func()) (*http.Response, error)

Do dispatches the HTTP request to the network.

Jump to

Keyboard shortcuts

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