Skip to content

Commit 33686bb

Browse files
Colinkz
Colin
authored andcommitted
Fix case-sensitive import collision (#1)
* fixed case-sensitive import collision changed 'Sirupsen/logrus' to the new lowercase 'sirupsen/logrus' * fix .travis.yml
1 parent d2efb7a commit 33686bb

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ go:
66
- 1.8
77
- master
88
install:
9-
- go get github.com/Sirupsen/logrus
9+
- go get github.com/sirupsen/logrus

discordrus.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package discordrus
22

33
import (
4-
"github.com/Sirupsen/logrus"
5-
"encoding/json"
6-
"strings"
7-
"net/http"
84
"bytes"
5+
"encoding/json"
96
"fmt"
7+
"net/http"
8+
"strings"
9+
10+
"github.com/sirupsen/logrus"
1011
)
1112

1213
const (

discordrus_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package discordrus
22

33
import (
4-
"github.com/Sirupsen/logrus"
5-
"os"
6-
"testing"
74
"bytes"
85
"net/http"
6+
"os"
97
"strings"
8+
"testing"
109
"time"
10+
11+
"github.com/sirupsen/logrus"
1112
)
1213

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

129129
for _, test := range tests {

levels.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package discordrus
22

33
import (
4-
"github.com/Sirupsen/logrus"
4+
"github.com/sirupsen/logrus"
55
)
66

77
// LevelColors is a struct of the possible colors used in Discord color format (0x[RGB] converted to int)

levels_test.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package discordrus
22

33
import (
4-
"testing"
5-
"github.com/Sirupsen/logrus"
64
"reflect"
5+
"testing"
6+
7+
"github.com/sirupsen/logrus"
78
)
89

910
// TestAllLevels ensures that logrus' AllLevels has not changed
@@ -71,16 +72,16 @@ func TestLevelColor(t *testing.T) {
7172
Panic: 5,
7273
Fatal: 6,
7374
}
74-
75+
7576
// Test default colors
7677
expectedDefaultColorForError := DefaultLevelColors.Error
7778
if expectedDefaultColorForError != DefaultLevelColors.LevelColor(logrus.ErrorLevel) {
7879
t.Error("Error color for default LevelColor is not as expected")
7980
}
80-
81+
8182
// Test custom colors
8283
expectedCustomColorForPanic := customLevelColors.Panic
8384
if expectedCustomColorForPanic != customLevelColors.LevelColor(logrus.PanicLevel) {
8485
t.Error("Panic color for custom LevelColor is not as expected")
85-
}
86+
}
8687
}

0 commit comments

Comments
 (0)