utils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue

func Blue(s string) string

func Error

func Error(format string, a ...interface{})

func GetRequestBody

func GetRequestBody(reqURL string) []byte

GetRequestBody http get body

func GetShortURL

func GetShortURL(url string) string

GetShortURL get sina short url

func Green

func Green(s string) string

func Info

func Info(format string, a ...interface{})

func Magenta

func Magenta(s string) string

func Red

func Red(s string) string

func RemoveSpace

func RemoveSpace(s string) string

func Success

func Success(format string, a ...interface{})

func Trace

func Trace(format string, a ...interface{})

see complete color rules in document in https://en.wikipedia.org/wiki/ANSI_escape_code#cite_note-ecma48-13

func Warning

func Warning(format string, a ...interface{})

func Yellow

func Yellow(s string) string

Types

type BaseArticle

type BaseArticle struct {
	Title   string `json:"title,omitempty"`
	URL     string `json:"url,omitempty"`
	Content string `json:"content,omitempty"`
}

BaseArticle topic

type Options

type Options struct {
	News        bool
	Github      bool
	Films       bool
	V2EX        bool
	Zhihu       bool
	JianDan     bool
	HackNews    bool
	Reddit      bool
	ProductHunt bool
	Medium      bool
	Query       string
}

Options terminal args

func ParseArgs

func ParseArgs(args []string) *Options

ParseArgs parse terminal arguments

Jump to

Keyboard shortcuts

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