container

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringContainer

type StringContainer map[string]struct{}

StringContainer stores a slice of strings for efficient membership checks.

func NewStringContainer

func NewStringContainer(items []string) *StringContainer

NewStringContainer returns a StringContainer initialized with the given strings.

func (StringContainer) Contains

func (c StringContainer) Contains(item string) bool

Contains efficiently returns whether the given string exists in the container.

func (StringContainer) String

func (c StringContainer) String() string

String returns a flattened string reprentation of the keys in the StringContainer.

Jump to

Keyboard shortcuts

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