X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=main.go;h=365895dc1cd03a1918ae313282c155e166d7f6bf;hb=4146283be1f2cf745e095d76ce72f05dcfd71219;hp=e31ae19cbf3839f45cbc5b095e29d3b45a814677;hpb=5c11b61671366c1ed0064dab6dcd162d11e63286;p=uploader.git diff --git a/main.go b/main.go index e31ae19..365895d 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,6 @@ import ( "fmt" "html/template" "io" - "io/ioutil" "log" "mime" "net" @@ -167,14 +166,14 @@ func upload(w http.ResponseWriter, r *http.Request) { var commentLines []string p, err = mr.NextPart() if err == nil && p.FormName() == CommentFieldName { - comment, err := ioutil.ReadAll(p) + comment, err := io.ReadAll(p) if err == nil && len(comment) > 0 { commentLines = strings.Split(string(comment), "\n") wr.WriteFieldMultiline("Comment", commentLines) } } - ioutil.WriteFile(tai+".rec", rec.Bytes(), os.FileMode(0666)) + os.WriteFile(tai+".rec", rec.Bytes(), os.FileMode(0666)) if *NotifyToAddr == "" { return }