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

fixed case-sensitive import collision #1

Merged
merged 2 commits into from
Jul 17, 2017
Merged
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 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ go:
- 1.8
- master
install:
- go get github.com/Sirupsen/logrus
- go get github.com/sirupsen/logrus
9 changes: 5 additions & 4 deletions discordrus.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package discordrus

import (
"github.com/Sirupsen/logrus"
"encoding/json"
"strings"
"net/http"
"bytes"
"encoding/json"
"fmt"
"net/http"
"strings"

"github.com/sirupsen/logrus"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions discordrus_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package discordrus

import (
"github.com/Sirupsen/logrus"
"os"
"testing"
"bytes"
"net/http"
"os"
"strings"
"testing"
"time"

"github.com/sirupsen/logrus"
)

func init() {
Expand Down Expand Up @@ -123,7 +124,6 @@ func TestMaxLengths(t *testing.T) {
json: "{\"embeds\":[{\"author\":{\"name\":\"A\"},\"description\":\"" + strings.Repeat("A", maxDescriptionChars+1) + "\",\"fields\":[{\"name\":\"A\",\"value\":\"A\"}],\"title\":\"A\"}],\"username\":\"AA\"}",
expectedStatusCode: 400,
},

}

for _, test := range tests {
Expand Down
2 changes: 1 addition & 1 deletion levels.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package discordrus

import (
"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

// LevelColors is a struct of the possible colors used in Discord color format (0x[RGB] converted to int)
Expand Down
11 changes: 6 additions & 5 deletions levels_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package discordrus

import (
"testing"
"github.com/Sirupsen/logrus"
"reflect"
"testing"

"github.com/sirupsen/logrus"
)

// TestAllLevels ensures that logrus' AllLevels has not changed
Expand Down Expand Up @@ -71,16 +72,16 @@ func TestLevelColor(t *testing.T) {
Panic: 5,
Fatal: 6,
}

// Test default colors
expectedDefaultColorForError := DefaultLevelColors.Error
if expectedDefaultColorForError != DefaultLevelColors.LevelColor(logrus.ErrorLevel) {
t.Error("Error color for default LevelColor is not as expected")
}

// Test custom colors
expectedCustomColorForPanic := customLevelColors.Panic
if expectedCustomColorForPanic != customLevelColors.LevelColor(logrus.PanicLevel) {
t.Error("Panic color for custom LevelColor is not as expected")
}
}
}