package
Version:
v1.2.36
Opens a new window with list of versions in this module.
Published: Dec 5, 2024
License: Unlicense
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
var (
WS = by("ws://")
WSS = by("wss://")
HTTP = by("http://")
HTTPS = by("https://")
)
func Msg(prefix Reason, format st, params ...any) by
Msg constructs a properly formatted message with a machine-readable prefix for OK and CLOSED
envelopes.
func URL[V st | by](v V) (b by)
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
func (r Reason) F(format st, params ...any) by
func (r Reason) IsPrefix(reason by) bo
Source Files
¶
Click to show internal directories.
Click to hide internal directories.