@@ -2,7 +2,6 @@ package commando
22
33import (
44 "fmt"
5- "io/ioutil"
65 "os"
76 "path"
87 "strings"
@@ -124,21 +123,21 @@ func (w *fileWriter) WriteResponse(r []interface{}, name string) error {
124123 c := sanitizeCmd (resp .ChannelInput )
125124
126125 rb := []byte (resp .Result )
127- if err := ioutil .WriteFile (path .Join (outDir , c ), rb , filePermissions ); err != nil {
126+ if err := os .WriteFile (path .Join (outDir , c ), rb , filePermissions ); err != nil {
128127 return err
129128 }
130129 }
131130 case * cfg.Response :
132131 rb := []byte (respObj .Result )
133- if err := ioutil .WriteFile (path .Join (outDir , respObj .OperationType ), rb , filePermissions ); err != nil {
132+ if err := os .WriteFile (path .Join (outDir , respObj .OperationType ), rb , filePermissions ); err != nil {
134133 return err
135134 }
136135 case * cfg.DiffResponse :
137136 rb := []byte (
138137 fmt .Sprintf ("Device Diff:\n %s\n \n Side By Side Diff:\n %s\n \n Unified Diff:\n %s" ,
139138 respObj .DeviceDiff , respObj .SideBySideDiff (), respObj .UnifiedDiff ()),
140139 )
141- if err := ioutil .WriteFile (path .Join (outDir , respObj .OperationType ), rb , filePermissions ); err != nil {
140+ if err := os .WriteFile (path .Join (outDir , respObj .OperationType ), rb , filePermissions ); err != nil {
142141 return err
143142 }
144143 }
0 commit comments