cmd

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SearchCmd = &cobra.Command{
	Use:   "s <query>",
	Short: "Web search from the terminal",
	Long:  `Web search from the terminal.`,
	Run: func(cmd *cobra.Command, args []string) {
		err := performCommand(cmd, args)
		if err != nil {
			bail(err)
		}
	},
}

SearchCmd is the main command for Cobra.

Functions

This section is empty.

Types

type Config added in v0.4.0

type Config struct {
	Blacklist       []string                    `json:"blacklist"`
	Binary          string                      `json:"binary"`
	Cert            string                      `json:"cert"`
	CustomProviders []*providers.CustomProvider `json:"customProviders"`
	DisplayVersion  bool                        `json:"-"`
	Key             string                      `json:"key"`
	ListProviders   bool                        `json:"-"`
	Port            int                         `json:"port,string"`
	Provider        string                      `json:"provider"`
	ServerMode      bool                        `json:"-"`
	Verbose         bool                        `json:"verbose,string"`
	Whitelist       []string                    `json:"whitelist"`
}

Config stores all the application configuration.

func (*Config) Load added in v0.4.0

func (c *Config) Load() error

Load reads the configuration from ~/.s/config and loads it into the Config struct. The config is in UCL format.

Jump to

Keyboard shortcuts

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