package wgtest

import "golang.zx2c4.com/wireguard/wgctrl/internal/wgtest"

Package wgtest contains shared testing utilities for package wgctrl.

Index

Functions

func MustCIDR

func MustCIDR(s string) net.IPNet

MustCIDR converts CIDR string s into a net.IPNet or panics.

func MustHexKey

func MustHexKey(s string) wgtypes.Key

MustHexKey decodes a hex string s as a key or panics.

func MustPresharedKey

func MustPresharedKey() wgtypes.Key

MustPresharedKey generates a preshared key or panics.

func MustPrivateKey

func MustPrivateKey() wgtypes.Key

MustPrivateKey generates a private key or panics.

func MustPublicKey

func MustPublicKey() wgtypes.Key

MustPublicKey generates a public key or panics.

func MustUDPAddr

func MustUDPAddr(s string) *net.UDPAddr

MustUDPAddr parses s as a UDP address or panics.

Source Files

doc.go wgtest.go

Version
v0.0.0-20241231184526-a9ab2273dd10 (latest)
Published
Dec 31, 2024
Platform
linux/amd64
Imports
4 packages
Last checked
1 month ago

Tools for package owners.