2
0

fix module declaration and remove toml dependency (#178)

This commit is contained in:
Nate Finch
2023-02-06 14:38:14 -05:00
committed by GitHub
parent 215739b3bc
commit 4cb27fcfbb
3 changed files with 1 additions and 28 deletions
+1 -3
View File
@@ -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
View File
@@ -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
View File
@@ -10,8 +10,6 @@ import (
"path/filepath"
"testing"
"time"
"github.com/BurntSushi/toml"
)
// !!!NOTE!!!
@@ -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.