Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoGoodResult = errors.New("no good search results found") ErrAPIResponse = errors.New("duckduckgo api responded with error") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines an HTTP client for communicating with duckduckgo.
func New ¶
New initializes a Client with arguments for setting a max results per search query and a value for the user agent header.
func (*Client) Search ¶
Search performs a search query and returns the result as string and an error if any.
func (*Client) SetMaxResults ¶
Click to show internal directories.
Click to hide internal directories.