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 ...@@ -5,19 +5,19 @@ package sealed_sector_health
type Health int type Health int
const ( const (
Unknown Health = iota Unknown Health = iota
Ok // everything is fine Ok // everything is fine
ErrorInvalidChecksum // sector exists, but checksum is invalid InvalidChecksum // sector exists, but checksum is invalid
ErrorInvalidLength // sector exists, but length is incorrect InvalidLength // sector exists, but length is incorrect
ErrorMissing // sector no longer exists Missing // sector no longer exists
) )
var labels = [...]string{ var labels = [...]string{
"Unknown", "Unknown",
"Ok", "Ok",
"ErrorInvalidChecksum", "InvalidChecksum",
"ErrorInvalidLength", "InvalidLength",
"ErrorMissing", "Missing",
} }
func (el Health) String() string { func (el Health) String() string {
......
...@@ -136,11 +136,11 @@ func goSealedSectorHealth(health C.sector_builder_ffi_FFISealedSectorHealth) (se ...@@ -136,11 +136,11 @@ func goSealedSectorHealth(health C.sector_builder_ffi_FFISealedSectorHealth) (se
case C.Ok: case C.Ok:
return sealed_sector_health.Ok, nil return sealed_sector_health.Ok, nil
case C.ErrorInvalidChecksum: case C.ErrorInvalidChecksum:
return sealed_sector_health.ErrorInvalidChecksum, nil return sealed_sector_health.InvalidChecksum, nil
case C.ErrorInvalidLength: case C.ErrorInvalidLength:
return sealed_sector_health.ErrorInvalidLength, nil return sealed_sector_health.InvalidLength, nil
case C.ErrorMissing: case C.ErrorMissing:
return sealed_sector_health.ErrorMissing, nil return sealed_sector_health.Missing, nil
default: default:
return sealed_sector_health.Unknown, errors.Errorf("unhandled sealed sector health: %v", health) 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