]> Sergey Matveev's repositories - sgblog.git/blobdiff - cmd/sgblog-comment-add/mail.go
io/ioutil is deprecated since Go 1.16
[sgblog.git] / cmd / sgblog-comment-add / mail.go
index 3ffc1e84ac83df06c6cf52445984ff4a8953b325..6d1aa5452eb0a9c8a99bcd9c141db4c6218096a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
 SGBlog -- Git-backed CGI/UCSPI blogging/phlogging/gemlogging engine
-Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2022 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as
@@ -22,7 +22,6 @@ import (
        "encoding/base64"
        "errors"
        "io"
-       "io/ioutil"
        "mime"
        "mime/multipart"
        "mime/quotedprintable"
@@ -84,7 +83,7 @@ func parseEmail(msg *mail.Message) (subj string, body io.Reader, err error) {
                err = errors.New("no boundary string")
                return
        }
-       data, err := ioutil.ReadAll(msg.Body)
+       data, err := io.ReadAll(msg.Body)
        if err != nil {
                return
        }