syncset

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package syncset implements sets that can be safely accessed concurrently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set is a set of strings.

func New

func New() *Set

New returns a new, empty set.

func (*Set) Add

func (s *Set) Add(v string) bool

Add adds the value v to the set and returns true if it wasn't in the set before. It returns false otherwise.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL