Skip to content

Commit

Permalink
fixed more print formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStashley committed Mar 20, 2024
1 parent 917bedd commit e6596ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wavesrv/cmd/main-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -898,13 +898,13 @@ func configDirHandler(w http.ResponseWriter, r *http.Request) {
dirFile, err := os.Open(configFullPath)
if err != nil {
w.WriteHeader(500)
w.Write([]byte(fmt.Sprintf("error opening specified dir: ", err)))
w.Write([]byte(fmt.Sprintf("error opening specified dir: %v", err)))
return
}
entries, err := dirFile.Readdir(0)
if err != nil {
w.WriteHeader(500)
w.Write([]byte(fmt.Sprintf("error getting files: ", err)))
w.Write([]byte(fmt.Sprintf("error getting files: %v", err)))
return
}
var files []*packet.FileStatPacketType
Expand All @@ -916,7 +916,7 @@ func configDirHandler(w http.ResponseWriter, r *http.Request) {
dirListJson, err := json.Marshal(files)
if err != nil {
w.WriteHeader(500)
w.Write([]byte(fmt.Sprintf("json err: ", err)))
w.Write([]byte(fmt.Sprintf("json err: %v", err)))
return
}
w.WriteHeader(200)
Expand Down

0 comments on commit e6596ea

Please sign in to comment.