Skip to content

Commit

Permalink
fix module declaration and remove toml dependency (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
natefinch authored Feb 6, 2023
1 parent 215739b commit 4cb27fc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module github.com/natefinch/lumberjack

require github.com/BurntSushi/toml v0.3.1
module gopkg.in/natefinch/lumberjack.v2

go 1.13
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
23 changes: 0 additions & 23 deletions lumberjack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"path/filepath"
"testing"
"time"

"github.com/BurntSushi/toml"
)

// !!!NOTE!!!
Expand Down Expand Up @@ -709,27 +707,6 @@ func TestJson(t *testing.T) {
equals(true, l.Compress, t)
}

func TestToml(t *testing.T) {
data := `
filename = "foo"
maxsize = 5
maxage = 10
maxbackups = 3
localtime = true
compress = true`[1:]

l := Logger{}
md, err := toml.Decode(data, &l)
isNil(err, t)
equals("foo", l.Filename, t)
equals(5, l.MaxSize, t)
equals(10, l.MaxAge, t)
equals(3, l.MaxBackups, t)
equals(true, l.LocalTime, t)
equals(true, l.Compress, t)
equals(0, len(md.Undecoded()), t)
}

// makeTempDir creates a file with a semi-unique name in the OS temp directory.
// It should be based on the name of the test, to keep parallel tests from
// colliding, and must be cleaned up after the test is finished.
Expand Down

0 comments on commit 4cb27fc

Please sign in to comment.