package net

import "github.com/plgd-dev/go-coap/v3/test/net"

Helper package for tests, must not be used in production code.

Index

Functions

func NormalizeURLPath

func NormalizeURLPath(s string) string

NormalizeURLPath replace repeated '/' characters with a single '/' character and remove ending '/'.

func RandomURLString

func RandomURLString(n int) string

RandomURLString generates random URL path of length n.

func RandomValidURLString

func RandomValidURLString(n, maxSegmentLen int) string

RandomValidURLString generate URL path of length n where the delimiter '/' occurs at least every maxSegmentLen characters.

Source Files

uri.go

Version
v3.3.6 (latest)
Published
Sep 18, 2024
Platform
linux/amd64
Imports
4 packages
Last checked
1 week ago

Tools for package owners.