From 84b9d29fc98ce3be65a81fe2c2f1eb8842d3cfa8 Mon Sep 17 00:00:00 2001 From: aarifullin Date: Thu, 28 Sep 2023 17:18:36 +0300 Subject: [PATCH] [#170] checksum: Use constant mapping for checksum types Signed-off-by: Airat Arifullin --- checksum/checksum.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/checksum/checksum.go b/checksum/checksum.go index 37238af..9d227ad 100644 --- a/checksum/checksum.go +++ b/checksum/checksum.go @@ -24,17 +24,17 @@ type Checksum refs.Checksum // Type represents the enumeration // of checksum types. -type Type uint8 +type Type refs.ChecksumType const ( // Unknown is an undefined checksum type. - Unknown Type = iota + Unknown Type = Type(refs.UnknownChecksum) // SHA256 is a SHA256 checksum type. - SHA256 + SHA256 = Type(refs.SHA256) // TZ is a Tillich-ZĂ©mor checksum type. - TZ + TZ = Type(refs.TillichZemor) ) // ReadFromV2 reads Checksum from the refs.Checksum message. Checks if the