Commit 6e668981 authored by laser's avatar laser
Browse files

refactor(names): drop Error prefix as per magik6k

parent d6ca00c7
......@@ -5,19 +5,19 @@ package sealed_sector_health
type Health int
const (
Unknown Health = iota
Ok // everything is fine
ErrorInvalidChecksum // sector exists, but checksum is invalid
ErrorInvalidLength // sector exists, but length is incorrect
ErrorMissing // sector no longer exists
Unknown Health = iota
Ok // everything is fine
InvalidChecksum // sector exists, but checksum is invalid
InvalidLength // sector exists, but length is incorrect
Missing // sector no longer exists
)
var labels = [...]string{
"Unknown",
"Ok",
"ErrorInvalidChecksum",
"ErrorInvalidLength",
"ErrorMissing",
"InvalidChecksum",
"InvalidLength",
"Missing",
}
func (el Health) String() string {
......
......@@ -136,11 +136,11 @@ func goSealedSectorHealth(health C.sector_builder_ffi_FFISealedSectorHealth) (se
case C.Ok:
return sealed_sector_health.Ok, nil
case C.ErrorInvalidChecksum:
return sealed_sector_health.ErrorInvalidChecksum, nil
return sealed_sector_health.InvalidChecksum, nil
case C.ErrorInvalidLength:
return sealed_sector_health.ErrorInvalidLength, nil
return sealed_sector_health.InvalidLength, nil
case C.ErrorMissing:
return sealed_sector_health.ErrorMissing, nil
return sealed_sector_health.Missing, nil
default:
return sealed_sector_health.Unknown, errors.Errorf("unhandled sealed sector health: %v", health)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment