package utils
Import Path
/internal/utils (on go.dev)
Dependency Relation
imports 21 packages, and imported by 17 packages
Package-Level Functions (total 18)
func CaptureStackTrace() string
Type Parameters:
T: any
TODO remove if that speeds things up
DialWebSocket dials a WebSocket endpoint and returns a net.Conn carrying
binary messages as a byte stream. Useful for tunneling stream protocols.
func GetGlobalUnicastIp() (string, error) func GetVersion() string
J joins state names into a single string
Jw joins state names into a single string with a separator.
NewServerWSConn wraps an already upgraded server-side WebSocket into
a net.Conn.
RandId generates a random ID of the given length (defaults to 8).
Type Parameters:
S1: ~[]E
S2: ~[]E
E: comparable
SlicesEvery returns true if all elements of coll2 are in coll1.
Type Parameters:
S1: ~[]E
S2: ~[]E
E: comparable
SlicesNone returns true if none of the elements of coll2 are in coll1.
Type Parameters:
S: ~[]E
E: comparable
Type Parameters:
S: ~[]E
E: comparable
TruncateStr with shorten the string and leave a tripedot suffix.
Package-Level Variables (only one)
Fmt is a printer for large numbers
Package-Level Constants (only one)
EnvAmHostname will override the hostname in all machine names.
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |