From c2cfd8ae936a36e43b2324b07079405af71c8851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 20 Oct 2021 15:29:59 +0300 Subject: [PATCH] Some linter fixes Subset of issues flagged by a rather extensive golangci-lint config. Addresses issues in main non-test code only. --- ulid.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ulid.go b/ulid.go index 9ae2293..9f98159 100644 --- a/ulid.go +++ b/ulid.go @@ -235,13 +235,13 @@ func MustParseStrict(ulid string) ULID { } // Bytes returns bytes slice representation of ULID. -func (u ULID) Bytes() []byte { - return u[:] +func (id ULID) Bytes() []byte { + return id[:] } // String returns a lexicographically sortable string encoded ULID -// (26 characters, non-standard base 32) e.g. 01AN4Z07BY79KA1307SR9X4MV3 -// Format: tttttttttteeeeeeeeeeeeeeee where t is time and e is entropy +// (26 characters, non-standard base 32) e.g. 01AN4Z07BY79KA1307SR9X4MV3. +// Format: tttttttttteeeeeeeeeeeeeeee where t is time and e is entropy. func (id ULID) String() string { ulid := make([]byte, EncodedSize) _ = id.MarshalTextTo(ulid)