collections

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 0 Imported by: 6

Documentation

Overview

Package collections contains helper functions to work with collections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Index added in v1.23.6

func Index(key string, list []string) (int, bool)

Index finds given key in sequence. Second return value indicates if key was found or not. If the sequence is empty, zero index is returned with found flag set to false.

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice tests whether the given string is contained in slice of strings. If the slice is empty, false is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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