We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b46c43b commit fd208c9Copy full SHA for fd208c9
cmds/sync.go
@@ -3,7 +3,7 @@ package cmds
3
import (
4
"encoding/json"
5
"fmt"
6
- "io/ioutil"
+ "io"
7
"net/http"
8
"os"
9
@@ -40,7 +40,7 @@ func readYAML(filePath string) (map[string]interface{}, error) {
40
}
41
defer file.Close()
42
43
- fileData, err := ioutil.ReadAll(file)
+ fileData, err := io.ReadAll(file)
44
if err != nil {
45
return nil, fmt.Errorf("error reading YAML file: %v", err)
46
@@ -99,7 +99,7 @@ func Sync(remoteURL string) error {
99
return fmt.Errorf("error marshalling YAML: %v", err)
100
101
102
- err = ioutil.WriteFile(yamlFilePath, yamlBytes, 0644)
+ err = os.WriteFile(yamlFilePath, yamlBytes, 0644)
103
104
return fmt.Errorf("error writing YAML file: %v", err)
105
0 commit comments