Fixing bugs

Resolve application installation path errors
This commit is contained in:
link
2021-11-09 18:57:50 +08:00
parent 37130966cf
commit f020c1162d
15 changed files with 327 additions and 24 deletions

View File

@@ -146,3 +146,16 @@ func IsNotExistCreateFile(src string) error {
return nil
}
func ReadFullFile(path string) []byte {
file, err := os.Open(path)
if err != nil {
return []byte("")
}
defer file.Close()
content, err := ioutil.ReadAll(file)
if err != nil {
return []byte("")
}
return content
}