File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 5
5
"flag"
6
6
"fmt"
7
7
"io"
8
- "io/ioutil"
9
8
"log"
10
9
"os"
11
10
"os/exec"
@@ -208,7 +207,7 @@ var (
208
207
)
209
208
210
209
func getPluginProperties (jsonPropertiesFile string ) (map [string ]interface {}, error ) {
211
- pluginPropertiesJson , err := ioutil .ReadFile (jsonPropertiesFile )
210
+ pluginPropertiesJson , err := os .ReadFile (jsonPropertiesFile )
212
211
if err != nil {
213
212
fmt .Printf ("Could not read %s: %s\n " , filepath .Base (jsonPropertiesFile ), err )
214
213
return nil , err
Original file line number Diff line number Diff line change 6
6
"encoding/json"
7
7
"fmt"
8
8
"io"
9
- "io/ioutil"
10
9
"math/rand"
11
10
"os"
12
11
"os/exec"
@@ -199,7 +198,7 @@ func getInstalledGaugeJavaVersion() (string, error) {
199
198
if err != nil {
200
199
return "" , fmt .Errorf ("failed to get executable path. %w" , err )
201
200
}
202
- j , err := ioutil .ReadFile (filepath .Join (filepath .Dir (exPath ), "java.json" ))
201
+ j , err := os .ReadFile (filepath .Join (filepath .Dir (exPath ), "java.json" ))
203
202
if err != nil {
204
203
return "" , fmt .Errorf ("Unable to read java.json. %w" , err )
205
204
}
@@ -524,7 +523,7 @@ func build(destination string, classpath string) {
524
523
525
524
// Writing all java src file names to a file and using it as a @filename parameter to javac. Eg: javac -cp jar1:jar2 @sources.txt
526
525
// This needs to be done because if the number of java files is too high the command length will be more than that permitted by the os.
527
- tempDir , err := ioutil . TempDir ("" , "gauge_temp" )
526
+ tempDir , err := os . MkdirTemp ("" , "gauge_temp" )
528
527
if err != nil {
529
528
logMessage ("error" , fmt .Sprint (err .Error ()))
530
529
return
You can’t perform that action at this time.
0 commit comments