Skip to content

Commit

Permalink
fix additional info snapshot field
Browse files Browse the repository at this point in the history
  • Loading branch information
fraidev committed Nov 8, 2023
1 parent 000552f commit 279bb4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions pkg/snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ type TezosVersion struct {
}

type Version struct {
Major int `json:"major"`
Minor int `json:"minor"`
AdditionalInfo string `json:"additional_info"`
Major int `json:"major"`
Minor int `json:"minor"`
// This could be map[string]int or string
AdditionalInfo interface{} `json:"additional_info"`
}

type CommitInfo struct {
Expand Down
3 changes: 1 addition & 2 deletions pkg/util/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -226,7 +225,7 @@ func (s *SnapshotStorage) uploadSnapshot(ctx context.Context, file *os.File) err
log.Fatalf("Unable to get node version. %v \n", err)
}
defer reqVersion.Body.Close()
version, err := ioutil.ReadAll(reqVersion.Body)
version, err := io.ReadAll(reqVersion.Body)
if err != nil {
log.Fatalf("Unable to read node version. %v \n", err)
}
Expand Down

0 comments on commit 279bb4e

Please sign in to comment.