Skip to content

Commit fd208c9

Browse files
committed
cleanup
1 parent b46c43b commit fd208c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmds/sync.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmds
33
import (
44
"encoding/json"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"net/http"
88
"os"
99

@@ -40,7 +40,7 @@ func readYAML(filePath string) (map[string]interface{}, error) {
4040
}
4141
defer file.Close()
4242

43-
fileData, err := ioutil.ReadAll(file)
43+
fileData, err := io.ReadAll(file)
4444
if err != nil {
4545
return nil, fmt.Errorf("error reading YAML file: %v", err)
4646
}
@@ -99,7 +99,7 @@ func Sync(remoteURL string) error {
9999
return fmt.Errorf("error marshalling YAML: %v", err)
100100
}
101101

102-
err = ioutil.WriteFile(yamlFilePath, yamlBytes, 0644)
102+
err = os.WriteFile(yamlFilePath, yamlBytes, 0644)
103103
if err != nil {
104104
return fmt.Errorf("error writing YAML file: %v", err)
105105
}

0 commit comments

Comments
 (0)