mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
Use new methods in the io and os packages instead of ioutil ones
ioutil is deprecated in Go 1.16 and SFTPGo is an application, not a library, we have no reason to keep compatibility with old Go versions. Go 1.16 fix some cifs related issues too.
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
||||
"crypto/x509"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
ftpserver "github.com/fclairamb/ftpserverlib"
|
||||
@@ -42,7 +42,7 @@ func NewServer(config *Configuration, configDir string, binding Binding, id int)
|
||||
if !filepath.IsAbs(bannerFilePath) {
|
||||
bannerFilePath = filepath.Join(configDir, bannerFilePath)
|
||||
}
|
||||
bannerContent, err := ioutil.ReadFile(bannerFilePath)
|
||||
bannerContent, err := os.ReadFile(bannerFilePath)
|
||||
if err == nil {
|
||||
server.initialMsg = string(bannerContent)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user