Commit Graph

8 Commits (be140add75e8bcda8ec0b24e61a6305eea893458)

Author SHA1 Message Date
Joe Tsai 96f73b3894
logtail: do not panic in PrivateID.PublicID (#4815)
It is not idiomatic for Go code to panic for situations that
can be normal. For example, if a server receives PrivateID
from a client, it is normal for the server to call
PrivateID.PublicID to validate that the PublicID matches.
However, doing so would panic prior to this change.

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2 years ago
Josh Bleecher Snyder 1dc4151f8b logtail: add MustParsePublicID
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
3 years ago
Josh Bleecher Snyder e45d51b060 logtail: add a few new methods to PublicID
These are for use in our internal systems.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
3 years ago
Brad Fitzpatrick b34fbb24e8 logtail: reduce PublicID.UnmarshalText from 2 allocs to 0
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
Brad Fitzpatrick 5d67365cc9 logtail: add PrivateID.IsZero method 5 years ago
Brad Fitzpatrick 3464114b88 logtail: add ParsePublicID that doesn't allocate 5 years ago
Brad Fitzpatrick bdc55d7091 logtail: add ParsePrivateID 5 years ago
Earl Lee a8d8b8719a Move Linux client & common packages into a public repo. 5 years ago