@@ -25,7 +25,6 @@ import (
2525 "flag"
2626 "fmt"
2727 "io"
28- "io/ioutil"
2928 "os"
3029 "path/filepath"
3130 "strconv"
@@ -576,7 +575,7 @@ func main() {
576575 delayInMs = 1000
577576 }
578577
579- if fileContents , err := ioutil .ReadFile (splitPostServeAction [2 ]); err == nil {
578+ if fileContents , err := os .ReadFile (splitPostServeAction [2 ]); err == nil {
580579 err = hoverfly .SetLocalPostServeAction (splitPostServeAction [0 ], splitPostServeAction [1 ], string (fileContents ), delayInMs )
581580 if err != nil {
582581 log .WithFields (log.Fields {
@@ -615,7 +614,7 @@ func main() {
615614
616615 splitTemplateDataSource := strings .Split (v , " " )
617616 if len (splitTemplateDataSource ) == 2 {
618- if fileContents , err := ioutil .ReadFile (splitTemplateDataSource [1 ]); err == nil {
617+ if fileContents , err := os .ReadFile (splitTemplateDataSource [1 ]); err == nil {
619618 err = hoverfly .SetCsvDataSource (splitTemplateDataSource [0 ], string (fileContents ))
620619 if err != nil {
621620 log .WithFields (log.Fields {
@@ -677,7 +676,7 @@ func main() {
677676 cfg .Webserver = * webserver
678677
679678 if * pacFile != "" {
680- pacFileContent , err := ioutil .ReadFile (* pacFile )
679+ pacFileContent , err := os .ReadFile (* pacFile )
681680 if err != nil {
682681 log .WithFields (log.Fields {"error" : err .Error (), "pacFile" : * pacFile }).
683682 Fatal ("Failed to import pac file" )
0 commit comments