fixing dashboard on windows - https://github.com/golang/go/issues/45230
This commit is contained in:
parent
70ca68a6ec
commit
7078f784c4
|
@ -15,6 +15,7 @@ import (
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
@ -269,7 +270,8 @@ func getDashboardFromDir(parentDir string, dirEntries []fs.DirEntry, fsReadFile
|
||||||
}
|
}
|
||||||
|
|
||||||
//unmarshal file into map
|
//unmarshal file into map
|
||||||
embeddedFile, err := fsReadFile(filepath.Join(parentDir, file.Name()))
|
//have to use path (not filepath.Join) because of https://github.com/golang/go/issues/45230
|
||||||
|
embeddedFile, err := fsReadFile(path.Join(parentDir, file.Name()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue