mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-28 11:25:20 +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
67 lines
1.7 KiB
Go
67 lines
1.7 KiB
Go
// Code generated by "enumer -type=ActiveSideState"; DO NOT EDIT.
|
|
|
|
package job
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
const (
|
|
_ActiveSideStateName_0 = "ActiveSideReplicatingActiveSidePruneSender"
|
|
_ActiveSideStateName_1 = "ActiveSidePruneReceiver"
|
|
_ActiveSideStateName_2 = "ActiveSideDone"
|
|
)
|
|
|
|
var (
|
|
_ActiveSideStateIndex_0 = [...]uint8{0, 21, 42}
|
|
_ActiveSideStateIndex_1 = [...]uint8{0, 23}
|
|
_ActiveSideStateIndex_2 = [...]uint8{0, 14}
|
|
)
|
|
|
|
func (i ActiveSideState) String() string {
|
|
switch {
|
|
case 1 <= i && i <= 2:
|
|
i -= 1
|
|
return _ActiveSideStateName_0[_ActiveSideStateIndex_0[i]:_ActiveSideStateIndex_0[i+1]]
|
|
case i == 4:
|
|
return _ActiveSideStateName_1
|
|
case i == 8:
|
|
return _ActiveSideStateName_2
|
|
default:
|
|
return fmt.Sprintf("ActiveSideState(%d)", i)
|
|
}
|
|
}
|
|
|
|
var _ActiveSideStateValues = []ActiveSideState{1, 2, 4, 8}
|
|
|
|
var _ActiveSideStateNameToValueMap = map[string]ActiveSideState{
|
|
_ActiveSideStateName_0[0:21]: 1,
|
|
_ActiveSideStateName_0[21:42]: 2,
|
|
_ActiveSideStateName_1[0:23]: 4,
|
|
_ActiveSideStateName_2[0:14]: 8,
|
|
}
|
|
|
|
// ActiveSideStateString retrieves an enum value from the enum constants string name.
|
|
// Throws an error if the param is not part of the enum.
|
|
func ActiveSideStateString(s string) (ActiveSideState, error) {
|
|
if val, ok := _ActiveSideStateNameToValueMap[s]; ok {
|
|
return val, nil
|
|
}
|
|
return 0, fmt.Errorf("%s does not belong to ActiveSideState values", s)
|
|
}
|
|
|
|
// ActiveSideStateValues returns all values of the enum
|
|
func ActiveSideStateValues() []ActiveSideState {
|
|
return _ActiveSideStateValues
|
|
}
|
|
|
|
// IsAActiveSideState returns "true" if the value is listed in the enum definition. "false" otherwise
|
|
func (i ActiveSideState) IsAActiveSideState() bool {
|
|
for _, v := range _ActiveSideStateValues {
|
|
if i == v {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|