From 06134e95213fd7b430ea8cd059747ba2f28c0238 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Tue, 28 Feb 2023 19:00:11 -0800 Subject: [PATCH] types/logid: remove MustParsePublicID (#7405) Ever since the introduction of the "must" package, most MustXXX functions are no longer necessary. Remove this as it is no longer depended upon from within this repository and by the internal private repository. Signed-off-by: Joe Tsai --- types/logid/id.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/types/logid/id.go b/types/logid/id.go index b72eb0fd5..5046150e2 100644 --- a/types/logid/id.go +++ b/types/logid/id.go @@ -108,16 +108,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) {