diff --git a/facebox/facebox.go b/facebox/facebox.go index d8e5df9..3d83ac6 100644 --- a/facebox/facebox.go +++ b/facebox/facebox.go @@ -83,7 +83,7 @@ func (c *Client) Info() (*boxutil.Info, error) { return &info, nil } -// ErrFacebox represents an error from facebox. +// ErrFacebox represents an error from Facebox. type ErrFacebox string func (e ErrFacebox) Error() string { diff --git a/fakebox/fakebox.go b/fakebox/fakebox.go index 2096c66..722feb8 100644 --- a/fakebox/fakebox.go +++ b/fakebox/fakebox.go @@ -157,7 +157,7 @@ func (c *Client) Check(title string, content string, u *url.URL) (*Analysis, err return nil, errors.Wrap(err, "decoding response") } if !response.Success { - return nil, ErrNewsbox(response.Error) + return nil, ErrFakebox(response.Error) } return &Analysis{ Title: response.Title, @@ -166,9 +166,9 @@ func (c *Client) Check(title string, content string, u *url.URL) (*Analysis, err }, nil } -// ErrNewsbox represents an error from fakebox. -type ErrNewsbox string +// ErrFakebox represents an error from Fakebox. +type ErrFakebox string -func (e ErrNewsbox) Error() string { +func (e ErrFakebox) Error() string { return "fakebox: " + string(e) } diff --git a/nudebox/nudebox.go b/nudebox/nudebox.go index f688f4e..b42ed15 100644 --- a/nudebox/nudebox.go +++ b/nudebox/nudebox.go @@ -179,7 +179,7 @@ func (c *Client) parseCheckResponse(r io.Reader) (float64, error) { return checkResponse.Nude, nil } -// ErrNudebox represents an error from nudebox. +// ErrNudebox represents an error from Nudebox. type ErrNudebox string func (e ErrNudebox) Error() string { diff --git a/tagbox/tagbox.go b/tagbox/tagbox.go index 7c4bfa3..71826e1 100644 --- a/tagbox/tagbox.go +++ b/tagbox/tagbox.go @@ -77,7 +77,7 @@ type CheckResponse struct { CustomTags []Tag `json:"custom_tags"` } -// ErrTagbox represents an error from tagbox. +// ErrTagbox represents an error from Tagbox. type ErrTagbox string func (e ErrTagbox) Error() string { diff --git a/textbox/textbox.go b/textbox/textbox.go index dc15396..bebad28 100644 --- a/textbox/textbox.go +++ b/textbox/textbox.go @@ -147,7 +147,7 @@ func (c *Client) Check(r io.Reader) (*Analysis, error) { }, nil } -// ErrTextbox represents an error from textbox. +// ErrTextbox represents an error from Textbox. type ErrTextbox string func (e ErrTextbox) Error() string { diff --git a/videobox/videobox.go b/videobox/videobox.go index bd2a351..8fddc81 100644 --- a/videobox/videobox.go +++ b/videobox/videobox.go @@ -74,7 +74,7 @@ func (c *Client) Info() (*boxutil.Info, error) { return &info, nil } -// ErrVideobox represents an error from facebox. +// ErrVideobox represents an error from Videobox. type ErrVideobox string func (e ErrVideobox) Error() string { diff --git a/x/boxutil/doc.go b/x/boxutil/doc.go index 481754f..ed1eaa7 100644 --- a/x/boxutil/doc.go +++ b/x/boxutil/doc.go @@ -1,2 +1,2 @@ -// Package boxutil is DEPCREATED. Use github.com/machinebox/sdk-go/boxutil instead. +// Package boxutil is DEPCREATED and you should use github.com/machinebox/sdk-go/boxutil instead. package boxutil