types

package
v2.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(c interface{}) bool

IsNil returns true if given object is nil.

Types

type StringArray

type StringArray []string

StringArray describes string array type.

func (*StringArray) AddIfNotContains

func (s *StringArray) AddIfNotContains(item string) bool

AddIfNotContains add item if not already in collection. Function returns true or false according to add result.

func (StringArray) Contains

func (s StringArray) Contains(item string) bool

Contains checks if item is in collection.

func (*StringArray) HasOneOf

func (s *StringArray) HasOneOf(items ...string) bool

HasOneOf returns true when one of provided items is found in array.

func (*StringArray) Remove

func (s *StringArray) Remove(item string) bool

Remove item from collection. Function returns true or false according to removal result.

Jump to

Keyboard shortcuts

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