aboutsummaryrefslogtreecommitdiff
path: root/weed/command/scaffold.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2021-10-13 22:38:58 -0700
committerGitHub <noreply@github.com>2021-10-13 22:38:58 -0700
commit5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068 (patch)
treebb21b4450e8611eed89d33dfdd46e4e6144bc00b /weed/command/scaffold.go
parent46a09c60744eff104fdfc1a1fade38c5485f0dda (diff)
parenta23bcbb7ecf93fcda35976f4f2fb42a67830e718 (diff)
downloadseaweedfs-5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068.tar.xz
seaweedfs-5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068.zip
Merge pull request #2381 from Juneezee/deprecate-ioutil
refactor: move from io/ioutil to io and os package
Diffstat (limited to 'weed/command/scaffold.go')
-rw-r--r--weed/command/scaffold.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/weed/command/scaffold.go b/weed/command/scaffold.go
index 886c0ac5e..6fcbd7efb 100644
--- a/weed/command/scaffold.go
+++ b/weed/command/scaffold.go
@@ -2,9 +2,10 @@ package command
import (
"fmt"
- "github.com/chrislusf/seaweedfs/weed/command/scaffold"
- "io/ioutil"
+ "os"
"path/filepath"
+
+ "github.com/chrislusf/seaweedfs/weed/command/scaffold"
)
func init() {
@@ -55,7 +56,7 @@ func runScaffold(cmd *Command, args []string) bool {
}
if *outputPath != "" {
- ioutil.WriteFile(filepath.Join(*outputPath, *config+".toml"), []byte(content), 0644)
+ os.WriteFile(filepath.Join(*outputPath, *config+".toml"), []byte(content), 0644)
} else {
fmt.Println(content)
}