diff options
| author | Joe Tsai <joetsai@digital-static.net> | 2022-11-16 15:38:27 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-16 15:38:27 -0800 |
| commit | eff62b7b1b2f052d6ab5d1598e8909231487ef7a (patch) | |
| tree | ba3e5aad34427c5bfd2539d23285f88c57c0ee52 | |
| parent | 1de64e89cd5232f58d56b9f8261ac8da7f56f024 (diff) | |
| download | tailscale-eff62b7b1b2f052d6ab5d1598e8909231487ef7a.tar.xz tailscale-eff62b7b1b2f052d6ab5d1598e8909231487ef7a.zip | |
logtail: remove MustParsePublicID (#6335)
This function is no longer necessary as you can trivially rewrite:
logtail.MustParsePublicID(...)
with:
must.Get(logtail.ParsePublicID(...))
Signed-off-by: Joe Tsai <joetsai@digital-static.net>
| -rw-r--r-- | logtail/id.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/logtail/id.go b/logtail/id.go index a404732c5..8261905f2 100644 --- a/logtail/id.go +++ b/logtail/id.go @@ -109,16 +109,6 @@ func ParsePublicID(s string) (PublicID, error) { return p, nil } -// MustParsePublicID calls ParsePublicID and panics in case of an error. -// It is intended for use with constant strings, typically in tests. -func MustParsePublicID(s string) PublicID { - id, err := ParsePublicID(s) - if err != nil { - panic(err) - } - return id -} - func (id PublicID) MarshalText() ([]byte, error) { b := make([]byte, hex.EncodedLen(len(id))) if i := hex.Encode(b, id[:]); i != len(b) { |
