talos/pkg/machinery/nethelpers/vlanprotocol_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

30 lines
668 B
Go

// Code generated by "stringer -type=VLANProtocol -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[VLANProtocol8021Q-33024]
_ = x[VLANProtocol8021AD-34984]
}
const (
_VLANProtocol_name_0 = "802.1q"
_VLANProtocol_name_1 = "802.1ad"
)
func (i VLANProtocol) String() string {
switch {
case i == 33024:
return _VLANProtocol_name_0
case i == 34984:
return _VLANProtocol_name_1
default:
return "VLANProtocol(" + strconv.FormatInt(int64(i), 10) + ")"
}
}