Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-sectorbuilder
Commits
6e668981
Commit
6e668981
authored
Sep 16, 2019
by
laser
Browse files
refactor(names): drop Error prefix as per magik6k
parent
d6ca00c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
sealed_sector_health/health.go
View file @
6e668981
...
...
@@ -5,19 +5,19 @@ package sealed_sector_health
type
Health
int
const
(
Unknown
Health
=
iota
Ok
// everything is fine
Error
InvalidChecksum
// sector exists, but checksum is invalid
Error
InvalidLength
// sector exists, but length is incorrect
Error
Missing
// 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"
,
"
Error
InvalidChecksum"
,
"
Error
InvalidLength"
,
"
Error
Missing"
,
"InvalidChecksum"
,
"InvalidLength"
,
"Missing"
,
}
func
(
el
Health
)
String
()
string
{
...
...
transforms.go
View file @
6e668981
...
...
@@ -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
.
Error
InvalidChecksum
,
nil
return
sealed_sector_health
.
InvalidChecksum
,
nil
case
C
.
ErrorInvalidLength
:
return
sealed_sector_health
.
Error
InvalidLength
,
nil
return
sealed_sector_health
.
InvalidLength
,
nil
case
C
.
ErrorMissing
:
return
sealed_sector_health
.
Error
Missing
,
nil
return
sealed_sector_health
.
Missing
,
nil
default
:
return
sealed_sector_health
.
Unknown
,
errors
.
Errorf
(
"unhandled sealed sector health: %v"
,
health
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment