Skip to content

Commit 7753582

Browse files
authored
Update README.md
1 parent a7de910 commit 7753582

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

README.md

-24
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ First, to use this library you need to add it to your go module:
1010
$ go get github.com/kerelape/bitmask
1111
```
1212

13-
### Mask
14-
1513
Functions in this module can work with any `uint64` derivative,
1614
but for convenience there is a predefined type alias called
1715
`Mask`, and it is recommended to use it as the base type for
@@ -59,25 +57,3 @@ hasFlag1 := bitmask.Has(mask, MyMaskFlag1) // true if the flag is set in the mas
5957
mask = bitmask.Set(mask, MyMaskFlag2) // sets the flag to the mask and returns it
6058
mask = bitmask.Clear(mask, MyMaskFlag1) // unsets the flag in the mask and returns it
6159
```
62-
63-
### Flag
64-
65-
Declare flags:
66-
67-
```go
68-
const (
69-
Flag1 bitmask.Flag[MyMask] = 1 << iota
70-
Flag2
71-
Flag3
72-
...
73-
FlagN
74-
)
75-
```
76-
77-
And use them:
78-
79-
```go
80-
mask := bitmask.New[MyMask](Flag1, Flag2)
81-
mask = bitmask.Set(mask, Flag3)
82-
mask = bitmask.Clear(mask, Flag2)
83-
```

0 commit comments

Comments
 (0)