types

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 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 CiMap

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

CiMap is a thin wrapper around a map to allow case insensitive keys.

func MakeCiMap

func MakeCiMap() *CiMap

MakeCiMap is a helper that constructs a CiMap struct.

func (*CiMap) ContainKeyValuePair

func (c *CiMap) ContainKeyValuePair(key, val string) bool

ContainKeyValuePair returns true if the specified key exists and has as value the specified value.

func (*CiMap) Get

func (c *CiMap) Get(k string) (string, bool)

Get returns two values: the actual value for the key and a boolean that indicates if the key exists.

func (*CiMap) GetMap

func (c *CiMap) GetMap() map[string]string

GetMap extracts the inner map from the wrapper.

func (*CiMap) GetValue

func (c *CiMap) GetValue(k string) string

GetValue returns the value for the given key and an empty string if the key does not exist.

func (*CiMap) Set

func (c *CiMap) Set(k, v string)

Set inserts a key and its value into the map.

func (*CiMap) Size

func (c *CiMap) Size() int

Size returns the number of elements in the map.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳