Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lowercase github.com/Sirupsen/logrus #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go-emailacid is a [Go](http://golang.org/) client package for accessing the [Ema
<a href="http://golang.org"><img alt="Go package" src="https://golang.org/doc/gopher/appenginegophercolor.jpg" width="20%" /></a>
<a href="http://trello.com"><img src="https://www.emailonacid.com/images/logos/white-splat.png" style="height: 80px; margin-bottom: 2em;"></a>

[![GoDoc](https://godoc.org/github.com/diogogmt/go-emailacid?status.png)](https://godoc.org/github.com/diogogmt/go-emailacid)
[![GoDoc](https://godoc.org/github.com/pressly/go-emailacid?status.png)](https://godoc.org/github.com/pressly/go-emailacid)


## Examples
Expand Down
10 changes: 0 additions & 10 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import (
"net/url"
"path"

"github.com/Sirupsen/logrus"
"github.com/parnurzeal/gorequest"
"github.com/pkg/errors"
"github.com/pressly/lg"
)

type EmailAcidClient struct {
Expand All @@ -29,12 +27,6 @@ type EmailAcidErrorBody struct {
}

func New(APIKey, password string, clientTypes []ClientType, verbose bool) *EmailAcidClient {
logger := logrus.New()
if verbose {
logger.Level = logrus.DebugLevel
}
lg.DefaultLogger = logger
lg.RedirectStdlogOutput(logger)
return &EmailAcidClient{
APIKey: APIKey,
Password: password,
Expand Down Expand Up @@ -68,12 +60,10 @@ func (client *EmailAcidClient) buildRequest(method, resourcePath string) (*goreq
}

func sendRequest(request *gorequest.SuperAgent, in, out interface{}) (string, error) {
lg.Debugf("req [%s] %s", request.Method, request.Url)
res, body, errs := request.Send(in).EndStruct(out)
if len(errs) != 0 {
return "", errs[0]
}
lg.Debugf("res [%d]", res.StatusCode)
if res.StatusCode < 200 || res.StatusCode > 299 {
var apiError EmailAcidError
json.Unmarshal([]byte(body), &apiError)
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/diogogmt/go-emailacid"
"github.com/pressly/go-emailacid"
)

var EmailAcidClient *emailacid.EmailAcidClient
Expand Down
2 changes: 1 addition & 1 deletion email_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package emailacid_test
import (
"testing"

emailacid "github.com/diogogmt/go-emailacid"
emailacid "github.com/pressly/go-emailacid"
)

func TestEmail(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/pressly/go-emailacid