Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Jan 9, 2018
1 parent 6df61e0 commit 4fb56f2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion facebox/facebox.go
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions fakebox/fakebox.go
Expand Up @@ -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,
Expand All @@ -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)
}
2 changes: 1 addition & 1 deletion nudebox/nudebox.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tagbox/tagbox.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion textbox/textbox.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion videobox/videobox.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion 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

0 comments on commit 4fb56f2

Please sign in to comment.