idset

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package idset implements a idempotent set of string IDs and helpers to use in the context of `rdoc`

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 IDs

func New

func New() *Set

New returns an empty set

func (*Set) Add

func (set *Set) Add(id string)

Add inserts a new id to the set

func (Set) Diff

func (set Set) Diff(ids []string) []string

Diff returns all strings in the base doc that do not exist in the Doc

func (Set) Exists

func (set Set) Exists(id string) bool

Exists checks whether an ID exists in the set

func (*Set) GetIDs added in v1.0.1

func (set *Set) GetIDs() []string

GetIDs returns a slice with all ids in the set

Jump to

Keyboard shortcuts

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