15 Commits

Author SHA1 Message Date
Yoshiyuki Mineo
d764be18d5 Update README.md (#69)
* Update README.md

* Update README.md

* Update test-v2.yml

* Update test-v1.yml
2025-05-05 14:46:40 +09:00
Yoshiyuki Mineo
7ee8f154df feat(v2): make bit assignment for time/sequence/machine customizable … (#68)
* feat(v2): make bit assignment for time/sequence/machine customizable via Settings; update all logic and tests

* gofmt
2025-05-05 14:16:21 +09:00
Yoshiyuki Mineo
357b2ee5f0 Upgrade Sonyflake to v2 (#66)
* Add v2

* Introduce staticcheck

* Introduce golangci-lint

* Add error checks

* Add error checks

* Lint v2 code

* Improve CI trigger

* Use io.ReadAll

* Use int64

* Remove NewSonyflake

* Fix errors

* v2: Change MachineID, sequence, and AmazonEC2MachineID to int; update all usage and tests for type consistency

* docs: update Settings struct in README to use int for MachineID and CheckMachineID (v2)

* docs(v2): clarify Settings, StartTime, MachineID, and CheckMachineID comments and update README links and explanations

* docs(v2/mock): improve comments and docstrings for mock implementations

* docs(types): unify and clarify package and type docstrings for types.go in v1 and v2

* test(v2): refactor and modernize tests, improve error assertions, and update mocks for v2

* test(v2): normalize whitespace in pseudoSleep calls for consistency

* feat(v2): add configurable TimeUnit and refactor time handling for So… (#67)

* feat(v2): add configurable TimeUnit and refactor time handling for Sonyflake v2

* test(v2): add ToTime tests, clarify TimeUnit behavior, and update docs for v2

* gofmt
2025-05-05 10:53:08 +09:00
Yoshiyuki Mineo
8d195df6f7 Fix a missing link (#65) 2025-05-01 19:25:49 +09:00
Yoshiyuki Mineo
06f9b47996 Introduce New function (#47)
* feat(Sonyflake): define error variables

* feat(Sonyflake): add New() function
- minor logic improvements
- return errors

* tests(Sonyflake): remove old TestNilSonyflake test function in favour of the New() function coverage

* gofmt

* Update error messages and comments

* Introduce New function

---------

Co-authored-by: Quetzy Garcia <quetzy.garcia@integrate.com>
2023-08-14 01:27:55 +09:00
Yoshiyuki Mineo
3719d006ac Add a note (#36) 2022-08-13 00:23:02 +09:00
Yoshiyuki Mineo
809c515cc5 Introduce GitHub Actions (#34)
* Introduce GitHub Actions

* gofmt
2022-08-12 18:38:40 +09:00
Yoshiyuki Mineo
59cd942daa Update README.md 2019-10-07 16:50:43 +09:00
Yoshiyuki Mineo
3ffd8c4254 Update README.md 2019-10-07 16:40:37 +09:00
yuokada
04f6255e27 Add a badge of goreportcard. 2016-05-28 23:00:03 +09:00
Yoshiyuki Mineo
568f953b2b Use SVG for GoDoc button 2016-05-04 23:15:03 +09:00
Yoshiyuki Mineo
c4c695c9ad Show the code coverage 2015-09-29 10:16:01 +09:00
Yoshiyuki Mineo
63503fdccf Add the link to godoc.org 2015-06-01 18:05:48 +09:00
Yoshiyuki Mineo
4a1a009a2e Show the build status 2015-06-01 17:34:36 +09:00
Yoshiyuki Mineo
ee7af3da63 Initial commit 2015-06-01 16:45:19 +09:00