2
0

Remove dependency on gopkg.in/yaml.v2 (#175)

This commit is contained in:
Nikhita Raghunath
2023-01-19 09:52:36 +05:30
committed by GitHub
parent 47ffae2331
commit 215739b3bc
3 changed files with 1 additions and 29 deletions
+1 -4
View File
@@ -1,8 +1,5 @@
module github.com/natefinch/lumberjack
require (
github.com/BurntSushi/toml v0.3.1
gopkg.in/yaml.v2 v2.2.2
)
require github.com/BurntSushi/toml v0.3.1
go 1.13
-4
View File
@@ -1,6 +1,2 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-21
View File
@@ -12,7 +12,6 @@ import (
"time"
"github.com/BurntSushi/toml"
"gopkg.in/yaml.v2"
)
// !!!NOTE!!!
@@ -710,26 +709,6 @@ func TestJson(t *testing.T) {
equals(true, l.Compress, t)
}
func TestYaml(t *testing.T) {
data := []byte(`
filename: foo
maxsize: 5
maxage: 10
maxbackups: 3
localtime: true
compress: true`[1:])
l := Logger{}
err := yaml.Unmarshal(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)
}
func TestToml(t *testing.T) {
data := `
filename = "foo"