mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
refactor: move from io/ioutil to io and os package (#1772)
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,7 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
@@ -23,7 +23,7 @@ func main() {
|
||||
input := common.PluginInput{}
|
||||
|
||||
if len(os.Args) < 2 {
|
||||
inData, _ := ioutil.ReadAll(os.Stdin)
|
||||
inData, _ := io.ReadAll(os.Stdin)
|
||||
log.Debugf("Raw input: %s", string(inData))
|
||||
decodeErr := json.Unmarshal(inData, &input)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user