You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by ke...@apache.org on 2021/07/16 17:21:47 UTC
[skywalking-eyes] branch main updated: Fix compatibility issues in
Windows (#44)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git
The following commit(s) were added to refs/heads/main by this push:
new 126ce2b Fix compatibility issues in Windows (#44)
126ce2b is described below
commit 126ce2b4360bce2f05d87344736f4b17e6e90f31
Author: Youhan Wu <43...@users.noreply.github.com>
AuthorDate: Sat Jul 17 01:21:39 2021 +0800
Fix compatibility issues in Windows (#44)
---
assets/assets.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/assets/assets.go b/assets/assets.go
index 7332988..bd7c9b9 100644
--- a/assets/assets.go
+++ b/assets/assets.go
@@ -21,15 +21,16 @@ package assets
import (
"embed"
"io/fs"
+ "path/filepath"
)
//go:embed *
var assets embed.FS
func Asset(file string) ([]byte, error) {
- return assets.ReadFile(file)
+ return assets.ReadFile(filepath.ToSlash(file))
}
func AssetDir(dir string) ([]fs.DirEntry, error) {
- return assets.ReadDir(dir)
+ return assets.ReadDir(filepath.ToSlash(dir))
}