Skip to content

Commit 73901b4

Browse files
committed
Modify variable name from path_to_json to pathToJson
1 parent 1b1ceb0 commit 73901b4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

commands/instances.go

+6-7
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,14 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexReq, downloadCB Downlo
207207
for _, x := range jsonPaths {
208208
logrus.Info("JSON PATH: ", x)
209209

210-
path_to_json, _ := paths.New(x).Abs()
210+
pathToJson, _ := paths.New(x).Abs()
211211

212-
if _, err := packageindex.LoadIndexNoSign(path_to_json); err != nil {
213-
return nil, fmt.Errorf("invalid package index in %s: %s", path_to_json, err)
212+
if _, err := packageindex.LoadIndexNoSign(pathToJson); err != nil {
213+
return nil, fmt.Errorf("invalid package index in %s: %s", pathToJson, err)
214214
} else {
215215
fi, _ := os.Stat(x)
216216
downloadCB(&rpc.DownloadProgress{
217-
File: "Updating index: " + path_to_json.Base(),
217+
File: "Updating index: " + pathToJson.Base(),
218218
TotalSize: fi.Size(),
219219
})
220220
downloadCB(&rpc.DownloadProgress{Completed: true})
@@ -676,10 +676,9 @@ func createInstance(ctx context.Context, getLibOnly bool) (*createInstanceResult
676676
jsonPaths := []string{}
677677
jsonPaths = append(jsonPaths, configuration.Settings.GetStringSlice("board_manager.additional_paths")...)
678678
for _, x := range jsonPaths {
679-
//path_to_json, err := paths.New(x).Abs()
680-
path_to_json, _ := paths.New(x).Abs()
679+
pathToJson, _ := paths.New(x).Abs()
681680

682-
_, err := res.Pm.LoadPackageIndexFromFile(path_to_json)
681+
_, err := res.Pm.LoadPackageIndexFromFile(pathToJson)
683682
if err != nil {
684683
res.PlatformIndexErrors = append(res.PlatformIndexErrors, err.Error())
685684
}

0 commit comments

Comments
 (0)