mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
chore: remove refs to deprecated io/ioutil (#376)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
@@ -2,7 +2,7 @@ package webui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"net/http"
|
||||
|
||||
"github.com/inbucket/inbucket/pkg/config"
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
// RootGreeting serves the Inbucket greeting.
|
||||
func RootGreeting(w http.ResponseWriter, req *http.Request, ctx *web.Context) (err error) {
|
||||
greeting, err := ioutil.ReadFile(ctx.RootConfig.Web.GreetingFile)
|
||||
greeting, err := os.ReadFile(ctx.RootConfig.Web.GreetingFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to load greeting: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user