normalize

package
v1.1.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reason

func Reason(reason string, prefix string) string

Reason takes a string message that is to be sent in an `OK` or `CLOSED` command and prefixes it with "<prefix>: " if it doesn't already have an acceptable prefix.

func URL

func URL(u string) string

URL normalizes the URL

- Adds wss:// to addresses without a port, or with 443 that have no protocol prefix

- Adds ws:// to addresses with any other port

- Converts http/s to ws/s

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL