talos/pkg/machinery/nethelpers/routeflag_string.go
Andrey Smirnov 205a8d6dc4
chore: make nethelpers build on all OSes
Related to #4420

This removes `linux` build tags to make sure all `nethelpers` build on
any OS, as it's part of Talos API (via resources). Constants were
replaced with literal values. Code generated by `stringer` serves as
proof of the change: constant values haven't changed.

Remove build tags from `pkgs/resources/network` now, marking only a part
of single file `_linux` (which converts link spec to low-level netlink
messages).

Theere should be no functional changes.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-10-26 22:45:10 +03:00

54 lines
1.2 KiB
Go

// Code generated by "stringer -type=RouteFlag -linecomment"; DO NOT EDIT.
package nethelpers
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[RouteNotify-256]
_ = x[RouteCloned-512]
_ = x[RouteEqualize-1024]
_ = x[RoutePrefix-2048]
_ = x[RouteLookupTable-4096]
_ = x[RouteFIBMatch-8192]
_ = x[RouteOffload-16384]
_ = x[RouteTrap-32768]
}
const (
_RouteFlag_name_0 = "notify"
_RouteFlag_name_1 = "cloned"
_RouteFlag_name_2 = "equalize"
_RouteFlag_name_3 = "prefix"
_RouteFlag_name_4 = "lookup_table"
_RouteFlag_name_5 = "fib_match"
_RouteFlag_name_6 = "offload"
_RouteFlag_name_7 = "trap"
)
func (i RouteFlag) String() string {
switch {
case i == 256:
return _RouteFlag_name_0
case i == 512:
return _RouteFlag_name_1
case i == 1024:
return _RouteFlag_name_2
case i == 2048:
return _RouteFlag_name_3
case i == 4096:
return _RouteFlag_name_4
case i == 8192:
return _RouteFlag_name_5
case i == 16384:
return _RouteFlag_name_6
case i == 32768:
return _RouteFlag_name_7
default:
return "RouteFlag(" + strconv.FormatInt(int64(i), 10) + ")"
}
}