providers

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Providers map[string]Provider

Providers tracks loaded providers.

Functions

func AddProvider

func AddProvider(name string, provider Provider)

AddProvider should be called within your provider's init() func. This will register the provider so it can be used.

func DisplayProviders

func DisplayProviders() string

DisplayProviders displays all the loaded providers.

func ExpandProvider added in v0.1.8

func ExpandProvider(provider string) (string, error)

ExpandProvider expands the passed in provider to the full value.

func Language added in v0.2.1

func Language() string

Language returns the users language code. Eg. "en", "es", etc

func ProviderNames added in v0.1.8

func ProviderNames() []string

ProviderNames returns a sorted slice of provider names.

func Region added in v0.2.1

func Region() string

Region returns the users region code. Eg. "US", "GB", etc

func Search(binary string, p string, q string, verbose bool) error

Search builds a search URL and opens it in your browser.

Types

type Provider

type Provider interface {
	BuildURI(string) string
}

Provider interface provides a way to build the URI for each provider.

Jump to

Keyboard shortcuts

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