Skip to content

Commit 9b8c3ef

Browse files
authored
docs for set pkg (#105)
Signed-off-by: Ashraf Fouda <ashraf.m.fouda@gmail.com>
1 parent 46dc603 commit 9b8c3ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/set/int.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
// Package set provides a thread-safe set of unsigned integers.
2+
// It is used by the network modules to track allocated ports and
3+
// prevent conflicts when multiple workloads request port reservations
4+
// concurrently.
15
package set
26

37
import (
48
"fmt"
59
"sync"
610
)
711

8-
// ErrConflict is return when trying to add a port
9-
// in the set that is already present
12+
// ErrConflict is returned when trying to add a value
13+
// that is already present in the set.
1014
type ErrConflict struct {
1115
Port uint
1216
}

0 commit comments

Comments
 (0)