Yoshiyuki Mineo
635994a2f6
test(v2): normalize whitespace in pseudoSleep calls for consistency
2025-05-05 01:11:05 +09:00
Yoshiyuki Mineo
2e5388b9dd
test(v2): refactor and modernize tests, improve error assertions, and update mocks for v2
2025-05-05 01:08:06 +09:00
Yoshiyuki Mineo
901da0b022
docs(types): unify and clarify package and type docstrings for types.go in v1 and v2
2025-05-04 18:02:49 +09:00
Yoshiyuki Mineo
7b636bf93a
docs(v2/mock): improve comments and docstrings for mock implementations
2025-05-04 17:54:58 +09:00
Yoshiyuki Mineo
58bcb1a582
docs(v2): clarify Settings, StartTime, MachineID, and CheckMachineID comments and update README links and explanations
2025-05-04 17:43:29 +09:00
Yoshiyuki Mineo
60560dc4f7
docs: update Settings struct in README to use int for MachineID and CheckMachineID (v2)
2025-05-04 17:01:18 +09:00
Yoshiyuki Mineo
fd450d1c8e
v2: Change MachineID, sequence, and AmazonEC2MachineID to int; update all usage and tests for type consistency
2025-05-04 16:48:11 +09:00
Yoshiyuki Mineo
585f877536
Fix errors
2025-05-02 02:48:23 +09:00
Yoshiyuki Mineo
313db86c15
Remove NewSonyflake
2025-05-02 02:42:07 +09:00
Yoshiyuki Mineo
c847588763
Use int64
2025-05-02 02:33:06 +09:00
Yoshiyuki Mineo
eccf7b77c8
Use io.ReadAll
2025-05-02 01:52:10 +09:00
Yoshiyuki Mineo
c3a11352a9
Improve CI trigger
2025-05-02 01:44:59 +09:00
Yoshiyuki Mineo
0b81988f79
Lint v2 code
2025-05-02 01:41:35 +09:00
Yoshiyuki Mineo
91ab975ee2
Add error checks
2025-05-02 01:35:27 +09:00
Yoshiyuki Mineo
f7d8fbd6eb
Add error checks
2025-05-02 01:32:39 +09:00
Yoshiyuki Mineo
bdd4a37407
Introduce golangci-lint
2025-05-02 01:27:00 +09:00
Yoshiyuki Mineo
8cab4fa3ea
Introduce staticcheck
2025-05-02 01:11:59 +09:00
Yoshiyuki Mineo
6ff253cccd
Add v2
2025-05-02 01:01:34 +09:00
Yoshiyuki Mineo
8d195df6f7
Fix a missing link ( #65 )
v1.2.1
2025-05-01 19:25:49 +09:00
Yoshiyuki Mineo
410eb250e3
Update Go versions ( #64 )
2025-05-01 19:15:37 +09:00
Yoshiyuki Mineo
94f43cfd99
Update Go versions ( #60 )
2024-10-13 22:30:52 +09:00
Yoshiyuki Mineo
b9b40b47a5
Update go versions ( #54 )
2024-04-30 15:50:36 +09:00
Yoshiyuki Mineo
a0558cef64
Link local ( #53 )
...
* Allow IPv4 Link Local addresses (#50 )
* Allow IPv4 Link Local addresses
Allow the use of link local addresses
* Update sonyflake.go
* Update sonyflake.go
* Update a comment
---------
Co-authored-by: Flavio Crisciani <f.crisciani@gmail.com >
2024-04-30 15:06:58 +09:00
David E. Wheeler
fc2f84a086
Use net.IP.Equal instead of bytes.Equal ( #49 )
...
As suggested by go-staticcheck.
2023-11-06 14:32:46 +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 >
v1.2.0
2023-08-14 01:27:55 +09:00
Yoshiyuki Mineo
18c4908321
Update go versions
2023-08-13 23:36:13 +09:00
Yoshiyuki Mineo
eafab81cd5
Update go versions ( #43 )
2023-05-04 02:08:54 +09:00
Yoshiyuki Mineo
597171da2e
Increase coverage ( #42 )
...
* Introduce mocking framework and increase coverage (#22 )
This change introduces two common golang patterns:
- types: this will allow fine-tuned control over imported
types by defining where they will be used and how
- mock: this allows the generation of mock constructors,
which allows for testing any individual path in a method by
"injecting" a mock method which matches the expected type
This change also increases test coverage to 100%
Co-authored-by: Yoshiyuki Mineo <Yoshiyuki.Mineo@jp.sony.com >
* gofmt
---------
Co-authored-by: Bradley Boutcher <btboutcher@icloud.com >
2023-05-04 00:08:20 +09:00
Yoshiyuki Mineo
cc94b60628
Check time order explicitly ( #37 )
...
* Add sortable test (#11 )
* add TestSortableID to make sure that generated ID(s) can be sorted like you are using increment id database
* add TestSortableID to make sure that generated ID(s) can be sorted like you are using increment id database
Co-authored-by: Yoshiyuki Mineo <Yoshiyuki.Mineo@jp.sony.com >
* gofmt
* Check time order explicitly
Co-authored-by: Yusuf Syaifudin <yusuf.syaifudin@gmail.com >
2022-08-17 14:33:52 +09:00
Yoshiyuki Mineo
3719d006ac
Add a note ( #36 )
v1.1.0
2022-08-13 00:23:02 +09:00
Yoshiyuki Mineo
90e18212ad
Add functions to get ID elements ( #35 )
...
* Refactoring
* Add functions to get ID elements
2022-08-12 18:42:10 +09:00
Yoshiyuki Mineo
809c515cc5
Introduce GitHub Actions ( #34 )
...
* Introduce GitHub Actions
* gofmt
2022-08-12 18:38:40 +09:00
Osamu TONOMORI
848d664cee
Make testing simple ( #20 )
...
* Make testing simpler
* Remove testing deps
* Simplemize tests
2020-08-27 10:17:19 +09:00
Yoshiyuki Mineo
60e9d38e92
Merge pull request #19 from osamingo/set-go-stable-versions
...
Set Go stable versions to .travis.yml
2020-08-18 16:53:08 +09:00
Osamu TONOMORI
f68244fede
Set Go stable versions
2020-08-10 16:05:22 +09:00
Osamu TONOMORI
963f058659
Remove sudo setting
...
Setting `sudo: false` is not recommended.
via/
https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2020-08-10 16:03:44 +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
Yoshiyuki Mineo
4ae3f1aeaa
Add go.mod and go.sum
v1.0.0
2019-05-27 14:27:51 +09:00
Yoshiyuki Mineo
6d5bd61810
Golint requires a supported release of Go
2018-11-09 11:24:03 +09:00
Yoshiyuki Mineo
7a6e82f3b6
Merge pull request #6 from golint-fixer/master
...
Fix golint import path
2018-11-09 11:20:34 +09:00
golint fixer
52d338556e
Fix golint import path
2018-10-25 09:36:52 -05:00
Yoshiyuki Mineo
fa881fb105
Merge pull request #3 from yuokada/feature/grcard
...
Fix ineffassign error
2016-05-30 11:15:00 +09:00
yuokada
24db3dfba6
Fix ineffassign error
2016-05-29 23:21:38 +09:00
yuokada
04f6255e27
Add a badge of goreportcard.
2016-05-28 23:00:03 +09:00
Yoshiyuki Mineo
829188d0aa
golint requires Go 1.5 or later nowadays
2016-05-08 23:11:44 +09:00
Yoshiyuki Mineo
568f953b2b
Use SVG for GoDoc button
2016-05-04 23:15:03 +09:00
Yoshiyuki Mineo
152b0c3130
Check if passing golint
2015-11-26 18:40:56 +09:00
Yoshiyuki Mineo
bd04110880
Check if the code is gofmt'ed
2015-11-26 18:36:40 +09:00
Yoshiyuki Mineo
c4c695c9ad
Show the code coverage
2015-09-29 10:16:01 +09:00