mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-12-24 13:11:46 +01:00
a node's BGP peer settings while maintaining backwards support for the existing annotations to address #1393.
23 lines
307 B
Go
23 lines
307 B
Go
package testutils
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/cloudnativelabs/kube-router/v2/pkg/utils"
|
|
)
|
|
|
|
type TestValue interface {
|
|
string | uint32 | net.IP | utils.Base64String
|
|
}
|
|
|
|
func ValToPtr[V TestValue](v V) *V {
|
|
return &v
|
|
}
|
|
|
|
func PtrToVal[V TestValue](v *V) V {
|
|
if v == nil {
|
|
return *new(V)
|
|
}
|
|
return *v
|
|
}
|