mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Enable module graph pruning and deprecate io/ioutil (#1600)
* Backend: Enable Go module graph pruning and lazy module loading This commit applies the changes by running `go mod tidy -go=1.17` to enable module graph pruning and lazy module loading supported by Go 1.17 or higher. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> * Backend: Move from io/ioutil to io and os package The io/ioutil package has been deprecated as of Go 1.16, see https://golang.org/doc/go1.16#ioutil. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -157,7 +156,7 @@ func backupAction(ctx *cli.Context) error {
|
||||
fmt.Println(out.String())
|
||||
} else {
|
||||
// Write output to file.
|
||||
if err := ioutil.WriteFile(indexFileName, []byte(out.String()), os.ModePerm); err != nil {
|
||||
if err := os.WriteFile(indexFileName, []byte(out.String()), os.ModePerm); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user