Skip to content
/ dilaudid Public
forked from darccio/go-ulid

ULID (univ. uniq. lex. sortable id) encoding and decoding in Go

License

Notifications You must be signed in to change notification settings

hlian/dilaudid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

    ~*~ hlian/dilaudid ~*~

    encoding and decoding ULIDs in go

      | everybody is identical in their
      | secret unspoken belief that way
      | deep down they are different
      | from everyone else –DFW

    about

    • this is a fork of imdario/go-ulid

    • we represent ULIDs differently
      (not as bytes)

    • for some reason, ULID libraries
      never include decoding
      • why is that?
      • is it our busy millenial lives?

    • anyway this library decodes

    installation

    $ go get github.com/hlian/dilaudid

    usage

    import "github.com/hlian/dilaudid"
    u := dilaudid.NewRandom()
    v, err := dilaudid.Decode("01B1JK8PG4Y5Z1ED14CACZHRBM")

    json support?

    we have (Un)MarshalJSON

    binary subspec support?

    • this does not implement the binary
      part of the specification

    • that part of the specification is
      way too complicated (why split a
      timestamp into an int32 and a
      int16 and then MSB each
      part?)

    performance

    $ go test --bench

    but also, who cares

About

ULID (univ. uniq. lex. sortable id) encoding and decoding in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%