Commit Graph

54 Commits

Author SHA1 Message Date
Tevin Zhang dbea605d7b Use v2 in the README 2021-09-25 14:19:00 +08:00
Tevin Zhang 7170548ea7 Add v2
Go requires a separated folder for v2+ to keep the
compatibility for tools that are not version-aware.
https://go.dev/blog/v2-go-modules
2021-09-25 13:55:34 +08:00
Tevin 4c6c31b893
Merge pull request #8 from ajbouh/patch-1
Fix a typo in the example of SetToIf
2021-09-12 12:51:57 +08:00
Adam Bouhenguel 9ec6c2a077
Update README.md
Fix README.md typo for SetToIf example
2021-09-11 15:45:43 -07:00
Tevin Zhang 7e73116d51
Add the credit for Lucas Rouckhout 2021-09-05 12:53:24 +08:00
Tevin Zhang 54e78cb940
Use the names of contributors on their profiles 2021-09-05 12:46:55 +08:00
Tevin Zhang fa0b8a912b
Revert "Merge pull request #3 from barryz/add_flip_method"
Due to a regression to `SetToIf` introduced by `Toggle`

This reverts commit d91eb651d5, reversing
changes made to 9b9efcf221.
2021-09-05 12:36:18 +08:00
Tevin 9f5df6da9f
Merge pull request #5 from LucasRouckhout/master
Implement the Unmarshaler and Marshaler interfaces.
2021-05-23 00:38:58 +08:00
Lucas Rouckhout b87acfe9bc Applied changes from golint 2021-05-16 15:13:06 +02:00
Tevin Zhang f55eb7cf2a
Add more cases and some refine to existing 2021-05-15 19:33:05 +08:00
Tevin Zhang b5c1b6e635
Reduce exit point 2021-05-15 19:31:34 +08:00
Tevin Zhang 85c50599ef
Polish comments 2021-05-15 19:31:02 +08:00
Lucas Rouckhout 037d8fa3d5 Add my name to thanks section ;) Ad removed a letter 'l' from Unmarshal(l) 2021-05-08 17:54:15 +02:00
Lucas Rouckhout b2658a5604 Use table-driven test to merge the true and false case of Unmarshalling 2021-05-08 17:49:35 +02:00
Lucas Rouckhout e91174bed9 Formatting 2021-05-04 19:29:53 +02:00
Lucas Rouckhout 3487d45a26 Adjust JSON unmarshalling to inherit from a bool instead of using a blank interface. 2021-05-04 19:26:17 +02:00
Lucas Rouckhout 9a297a52be Implement the Unmarshaler and Marshaler interfaces.
This allows an AtomicBool to be Unmarshalled from the JSON
representation of a normal boolean and respectively marshall
it into the JSON representation of normal booleans.

This makes it easier to use AtomicBool in structs. For they can
now be read from JSON files and serialized back into them.
2021-04-28 16:48:48 +02:00
Tevin Zhang f861b8e1c3
Remove useless parts in benchmarks 2020-07-16 15:02:52 +08:00
Tevin Zhang 78e36140ca
Separate test function into smaller cases 2020-07-16 15:01:49 +08:00
Tevin Zhang 8ae5c93531
Add IsNotSet() 2020-07-16 14:46:58 +08:00
Tevin Zhang 3a33536c80
Refine comments 2020-07-16 14:07:17 +08:00
Tevin Zhang e76b19742c
Refine description in README 2020-07-16 14:02:27 +08:00
Tevin Zhang cccf8069cb
Fix typos in README 2020-07-16 14:02:11 +08:00
Tevin Zhang 17b218e8c9
Update benchmark to Go 1.14.3 on Linux
Assuming that Linux is a more popular platform than Darwin when running
this package
2020-07-16 13:51:29 +08:00
Tevin Zhang 8ad37317dc
Update usage 2020-07-16 13:35:52 +08:00
Tevin Zhang d174386fab
Create module github.com/tevino/abool 2020-07-16 13:14:16 +08:00
Tevin Zhang 28ae9aa985
Refine README 2020-07-16 13:10:44 +08:00
Tevin d91eb651d5
Merge pull request #3 from barryz/add_flip_method
Add Toggle method to invert the value
2020-07-07 15:51:04 +08:00
Tevin Zhang 74242c7da7
Add thanks to contributors 2020-07-07 15:49:33 +08:00
Tevin Zhang 6ddf050e0e
Refine README 2020-07-07 15:47:21 +08:00
Tevin Zhang 53396ec6fe
Change return type of Toggle to simple bool 2020-07-07 15:33:59 +08:00
Tevin Zhang b830aebdb7
Enable parallel testing 2020-06-30 10:10:38 +08:00
Tevin Zhang 4bc34b54a1
Complete the implementation of toggle 2020-06-30 10:10:19 +08:00
Tevin Zhang 9c19061983
Add tests for Toggle() 2020-06-30 10:09:54 +08:00
barryz 9e538c6d38 implments Toggle method more explicit and simple. 2019-07-23 23:43:34 +08:00
barryz 774dbeaec2 fixing readme 2019-07-22 13:11:38 +08:00
barryz 42463bd9a0 atomically negates boolean value with Toggle method 2019-07-22 13:04:35 +08:00
barryz a8aae64969 Refine flip method, may be not atomic yet 2018-09-08 20:31:55 +08:00
Tevin 5a88366efc
Refine comments 2018-09-08 12:36:39 +08:00
Tevin 0bc71b68c3
Refine comments 2018-09-08 12:35:14 +08:00
barryz ae078ebcf7 Add Flip method to flip boolean value 2018-09-07 22:17:26 +08:00
Tevin 9b9efcf221 Golang is not Go 2017-09-17 14:19:28 +08:00
Tevin Zhang 3c25f2fe7c Add Go Report Card 2016-06-28 18:11:33 +08:00
Tevin Zhang 6662858d93 Refine comments 2016-06-02 11:50:26 +08:00
Tevin Zhang df1d8a392d Add CAS methods 2016-06-02 11:49:33 +08:00
Tevin Zhang 3bdfbdf06a Refine package description 2016-06-01 18:38:57 +08:00
Tevin Zhang bb33e2abb1 Add NewBool 2016-05-25 15:06:49 +08:00
Tevin Zhang 6e6b80cf11 Add race test 2016-05-25 14:57:10 +08:00
Tevin Zhang ba4fdb7068 Add example code 2016-05-25 14:16:55 +08:00
Tevin Zhang eedf32b55b Add package description 2016-05-25 14:08:20 +08:00