Use fs.FS in MergeFS implementation

This commit is contained in:
Deluan
2021-07-20 19:50:00 -04:00
parent 7540881695
commit 774ad65155
4 changed files with 68 additions and 81 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"encoding/json"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"github.com/navidrome/navidrome/consts"
@@ -37,7 +38,7 @@ var _ = Describe("Translations", func() {
Describe("loadTranslation", func() {
It("loads a translation file correctly", func() {
fs := http.Dir("ui/src")
fs := os.DirFS("ui/src")
tr, err := loadTranslation(fs, "en.json")
Expect(err).To(BeNil())
Expect(tr.ID).To(Equal("en"))