Thanks to visit codestin.com
Credit goes to github.com

Skip to content

v1.4.0

  • v1.4.0
  • 66f8c42
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Choose a tag to compare

  • v1.4.0
  • 66f8c42
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@smyrman smyrman tagged this 10 Mar 22:51
* chore: address linter issues

Perform changes suggested by linter; no functional changes.

* error.go: make ErrInvalidID a const

Make ErrInvalidID a constant instead of a variable. This prevent it from
being changed by external packages; a behavior that although allowed by 
the compiler, should probably be considered an invalid operation.

* add benchmark and new failing test for FromString

* fix: let decode look for additional base32 padding

Update FromString and XID.TextUnmarshal so that it looks for discarded
bits in the final source character. This ensures that XIDs that have
been manually tampered with in a way that's ignored by base32 decode,
will not pass as valid.
Assets 2
Loading