func MustPresharedKey() wgtypes.Key {
	k, err := wgtypes.GenerateKey()
	if err != nil {
		panicf("wgtest: failed to generate preshared key: %v", err)
	}
	return k
}
MustPresharedKey generates a preshared key or panics.
package wgtest
import (
	"encoding/hex"
	"fmt"
	"net"
	"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
func MustCIDR(s string) net.IPNet {
	_, cidr, err := net.ParseCIDR(s)
	if err != nil {
		panicf("wgtest: failed to parse CIDR: %v", err)
	}
	return *cidr
}
func MustHexKey(s string) wgtypes.Key {
	b, err := hex.DecodeString(s)
	if err != nil {
		panicf("wgtest: failed to decode hex key: %v", err)
	}
	k, err := wgtypes.NewKey(b)
	if err != nil {
		panicf("wgtest: failed to create key: %v", err)
	}
	return k
}