internal

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

adapted from github.com/jub0bs/cors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SortedSet

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

A SortedSet represents a mathematical set of strings sorted in lexicographical order. Each element has a unique position ranging from 0 (inclusive) to the set's cardinality (exclusive). The zero value represents an empty set.

func NewSortedSet

func NewSortedSet(elems ...string) SortedSet

NewSortedSet returns a SortedSet that contains all of elems, but no other elements.

func (SortedSet) Accepts added in v1.11.1

func (set SortedSet) Accepts(values []string) bool

Accepts reports whether values is a sequence of list-based field values whose elements are

  • all members of set,
  • sorted in lexicographical order,
  • unique.

func (SortedSet) Size

func (set SortedSet) Size() int

Size returns the cardinality of set.

func (SortedSet) String

func (set SortedSet) String() string

String sorts joins the elements of set (in lexicographical order) with a comma and returns the resulting string.

Jump to

Keyboard shortcuts

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