From c24fff4d2de5d62b9030440ba2edee3a9e3444b7 Mon Sep 17 00:00:00 2001 From: tbjump Date: Wed, 3 May 2023 22:33:58 +0000 Subject: [PATCH] sdk: fix linter warnings --- sdk/vaa/structs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/vaa/structs.go b/sdk/vaa/structs.go index 4d23fdb75..030206392 100644 --- a/sdk/vaa/structs.go +++ b/sdk/vaa/structs.go @@ -586,7 +586,7 @@ func UnmarshalBatch(data []byte) (*BatchVAA, error) { if err != nil { return nil, fmt.Errorf("failed to read Observation index [%d]: %w", i, err) } - obsvIndex := uint8(index) + var obsvIndex uint8 = index obsvLength := uint32(0) if err := binary.Read(reader, binary.BigEndian, &obsvLength); err != nil { @@ -827,7 +827,7 @@ func (v *BatchVAA) serializeBody() []byte { MustWrite(buf, binary.BigEndian, uint8(len(v.Observations))) for _, obsv := range v.Observations { - MustWrite(buf, binary.BigEndian, uint8(obsv.Index)) + MustWrite(buf, binary.BigEndian, obsv.Index) obsvBytes := obsv.Observation.serializeBody()