go-ask-stackoverflow

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 14 Imported by: 0

README

go-ask-stackoverflow

go-ask-stackoverflow is a simple terminal appilcation which quickly responds to your question with the accepted answer from StackOverflow. As we programmers tend to love StackOverflow for inspiration or just quick & dirty answers, go-ask-stackoverflow intent is to speed this up and be easily extendable.

Clone

$ git clone github.com/xtrcode/go-ask-stackoverflow
$ cd go-ask-stackoverflow/
$ go build -o ask main.go

Now you can move the executable to your preferred location (e.g. /usr/bin) and just

Enjoy

& ask whatever you want

Customize to your needs

Add custom search engine
type Engine interface {
	Request(str string) error
	Get() (string, error)
}
Add custom website parser
type Website interface {
	Get(url string) error
	Parse() (string, error)
}
Add custom cache driver
type Cache interface {
	Init() error
	Open() error
	Close() error
	Get(key string) (string, error)
	Set(key, value string) error
}

Credits

go-ask-stackoverflow is inspired by https://github.com/juliusmh/ask

LICENSE

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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