Skip to content

Commit

Permalink
Fix case-sensitive import collision (#1)
Browse files Browse the repository at this point in the history
* fixed case-sensitive import collision

changed 'Sirupsen/logrus' to the new lowercase 'sirupsen/logrus'

* fix .travis.yml
  • Loading branch information
Colin authored and kz committed Jul 17, 2017
1 parent d2efb7a commit 33686bb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
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")
}
}
}

0 comments on commit 33686bb

Please sign in to comment.