diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-01 17:05:07 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-01 17:05:07 +0200 |
commit | f944124325dd785085fec59210306111b3eab3b7 (patch) | |
tree | 53f88d24f42093df907f68a1a7eaf942bed0aeee /pkg/config/yaml_test.go | |
parent | d7de88398ca67d7213fb849db60e5963fd3bc32f (diff) | |
download | feed2imap-go-f944124325dd785085fec59210306111b3eab3b7.tar.gz feed2imap-go-f944124325dd785085fec59210306111b3eab3b7.tar.bz2 feed2imap-go-f944124325dd785085fec59210306111b3eab3b7.zip |
Yaml: Pass `Reader` around instead of []byte
Diffstat (limited to '')
-rw-r--r-- | pkg/config/yaml_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/config/yaml_test.go b/pkg/config/yaml_test.go index de20c9f..4fc501a 100644 --- a/pkg/config/yaml_test.go +++ b/pkg/config/yaml_test.go @@ -316,8 +316,9 @@ feeds: for _, tt := range tests { tst.Run(tt.name, func(tst *testing.T) { - var buf = []byte(tt.inp) - got, err := unmarshal(buf, WithDefault()) + in := strings.NewReader(tt.inp) + + got, err := unmarshal(in, WithDefault()) if (err != nil) != tt.wantErr { tst.Errorf("parse() error = %v, wantErr %v", err, tt.wantErr) return |