Skip to content

Commit

Permalink
Fixed warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Jun 17, 2019
1 parent 75ad88d commit a59619a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func captureOutput(f func()) string {
func TestLogLevel_String(t *testing.T) {

// Set the level
var level LogLevel = 0
var level LogLevel

// Test for debug
if level.String() != "debug" {
Expand Down Expand Up @@ -74,14 +74,14 @@ func TestLogLevel_String(t *testing.T) {

// ExampleLogLevel_String example using level.String()
func ExampleLogLevel_String() {
var level LogLevel = 0
var level LogLevel
fmt.Println(level.String())
// Output:debug
}

// BenchmarkLogLevel_String benchmarks the level.String() method
func BenchmarkLogLevel_String(b *testing.B) {
var level LogLevel = 0
var level LogLevel
for i := 0; i < b.N; i++ {
_ = level.String()
}
Expand Down

0 comments on commit a59619a

Please sign in to comment.