nanoid

A tiny, secure, URL-friendly, unique string ID generator for Go
git clone git://git.lair.cx/nanoid
Log | Files | Refs | README

commit 7dfe58e2bfc446a1ba23f09197f67147cca93d1e
parent 9708fec5c43d3b8a33dc0c9e28e9df9061f689fc
Author: Yongbin Kim <iam@yongbin.kim>
Date:   Tue, 10 Jan 2023 06:02:14 +0000

feat: Added GoString method

Diffstat:
Mnanoid.go | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/nanoid.go b/nanoid.go @@ -92,6 +92,11 @@ func (id NanoID) String() string { return string(id[:]) } +// GoString returns the string representation of the id. +func (id NanoID) GoString() string { + return id.String() +} + // Bytes returns the byte slice representation of the id. func (id NanoID) Bytes() []byte { return id[:]