mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 09:54:47 +01:00
def510abfd
Go upgrade: - Go 1.23 is current => use that for release builds - Go 1.22 is less than one year old, it's desirable to support it. - The [`Go Toolchains`](https://go.dev/doc/toolchain) stuff is available in both of these (would also be in Go 1.21). That is quite nice stuff, but required some changes to how we versions we use in CircleCI and the `release-docker` Makefile target. Protobuf upgrade: - Go to protobuf GH release website - Download latest locally - run `sha256sum` - replace existing pinned hashes - `make generate` Deps upgrade: - `go get -t -u all` - repository moves aren't handled well automatically, fix manually - repeat until no changes
50 lines
1.2 KiB
Go
50 lines
1.2 KiB
Go
// Code generated by "enumer -type=errorClass"; DO NOT EDIT.
|
|
|
|
package driver
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
const _errorClassName = "errorClassPermanenterrorClassTemporaryConnectivityRelated"
|
|
|
|
var _errorClassIndex = [...]uint8{0, 19, 57}
|
|
|
|
func (i errorClass) String() string {
|
|
if i < 0 || i >= errorClass(len(_errorClassIndex)-1) {
|
|
return fmt.Sprintf("errorClass(%d)", i)
|
|
}
|
|
return _errorClassName[_errorClassIndex[i]:_errorClassIndex[i+1]]
|
|
}
|
|
|
|
var _errorClassValues = []errorClass{0, 1}
|
|
|
|
var _errorClassNameToValueMap = map[string]errorClass{
|
|
_errorClassName[0:19]: 0,
|
|
_errorClassName[19:57]: 1,
|
|
}
|
|
|
|
// errorClassString retrieves an enum value from the enum constants string name.
|
|
// Throws an error if the param is not part of the enum.
|
|
func errorClassString(s string) (errorClass, error) {
|
|
if val, ok := _errorClassNameToValueMap[s]; ok {
|
|
return val, nil
|
|
}
|
|
return 0, fmt.Errorf("%s does not belong to errorClass values", s)
|
|
}
|
|
|
|
// errorClassValues returns all values of the enum
|
|
func errorClassValues() []errorClass {
|
|
return _errorClassValues
|
|
}
|
|
|
|
// IsAerrorClass returns "true" if the value is listed in the enum definition. "false" otherwise
|
|
func (i errorClass) IsAerrorClass() bool {
|
|
for _, v := range _errorClassValues {
|
|
if i == v {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|