### Get All Keys Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over all keys in the map. The iterator returns immediately if invoked on a nil map. ```go func (m *Map[K, V]) Keys() iter.Seq[K] ``` -------------------------------- ### Check Key Existence Source: https://pkg.go.dev/github.com/kamstrup/intmap Checks if a key exists in the map. This is more efficient than calling Get if only existence checking is needed. ```go func (m *Map[K, V]) Has(key K) bool ``` -------------------------------- ### Get Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns the value associated with the key if found. Returns the zero value for V and false if the key is not found or if the map is nil. ```APIDOC ## Get ### Description Get returns the value if the key is found. If you just need to check for existence it is easier to use Has. Calling this method on a nil map will return the zero value for V and false. ### Signature ```go func (m *Map[K, V]) Get(key K) (V, bool) ``` ### Parameters - **key** (K) - The key to retrieve the value for. ### Returns - **V** - The value associated with the key, or the zero value for V if the key is not found. - **bool** - True if the key was found, false otherwise. ``` -------------------------------- ### Get All Values Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over all values in the map. The iterator returns immediately if invoked on a nil map. ```go func (m *Map[K, V]) Values() iter.Seq[V] ``` -------------------------------- ### Get All Set Elements Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over all elements in the set. The iterator returns immediately if invoked on a nil set. ```go func (s *Set[K]) All() iter.Seq[K] ``` -------------------------------- ### Get Iterator for Set Elements Source: https://pkg.go.dev/github.com/kamstrup/intmap All returns an iterator over keys from the set. The iterator returns immediately if the set is nil. The iteration order of a Set is not defined, so please avoid relying on it. ```go func (s *Set[K]) All() iter.Seq[K] ``` -------------------------------- ### Get Value by Key Source: https://pkg.go.dev/github.com/kamstrup/intmap Retrieves the value associated with a given key. Returns the value and true if the key is found, otherwise returns the zero value for the value type and false. Calling on a nil map returns the zero value and false. ```go func (m *Map[K, V]) Get(key K) (V, bool) ``` -------------------------------- ### Get Set Length Source: https://pkg.go.dev/github.com/kamstrup/intmap Len returns the number of elements in the set. If the set is nil this method return 0. ```go func (s *Set[K]) Len() int ``` -------------------------------- ### Get Iterator for Map Keys Source: https://pkg.go.dev/github.com/kamstrup/intmap Keys returns an iterator over keys in m. The iterator returns immediately if invoked on a nil map. The iteration order of a Map is not defined, so please avoid relying on it. ```go func (m *Map[K, V]) Keys() iter.Seq[K] ``` -------------------------------- ### Get Map Length Source: https://pkg.go.dev/github.com/kamstrup/intmap Len returns the number of elements in the map. The length of a nil map is defined to be zero. ```go func (m *Map[K, V]) Len() int ``` -------------------------------- ### Get Iterator for Map Values Source: https://pkg.go.dev/github.com/kamstrup/intmap Values returns an iterator over values in m. The iterator returns immediately if invoked on a nil map. The iteration order of a Map is not defined, so please avoid relying on it. ```go func (m *Map[K, V]) Values() iter.Seq[V] ``` -------------------------------- ### Get Set Length Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns the number of elements currently stored in the set. This method is safe to call on a nil set, returning 0. ```go func (s *Set[K]) Len() int ``` -------------------------------- ### Map Type Definition Source: https://pkg.go.dev/github.com/kamstrup/intmap Defines the Map struct, a hashmap where keys are of any integer type specified by the IntKey constraint. Methods can be called on a nil map for read operations like Has, Get, Len, and ForEach. ```go type Map[K IntKey, V any] struct { // contains filtered or unexported fields } ``` -------------------------------- ### Get Map Length Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns the number of key-value pairs currently stored in the map. This method is safe to call on a nil map, returning 0. ```go func (m *Map[K, V]) Len() int ``` -------------------------------- ### Create and Use intmap Source: https://pkg.go.dev/github.com/kamstrup/intmap Demonstrates creating a new intmap, adding elements, retrieving them, deleting elements, and iterating over the map. The map can be cleared while retaining internal buffers for reuse. ```go m := intmap.New[int64,int64](32768) m.Put(int64(1234), int64(-222)) m.Put(int64(123), int64(33)) v, ok := m.Get(int64(222)) v, ok := m.Get(int64(333)) m.Del(int64(222)) m.Del(int64(333)) fmt.Println(m.Len()) m.ForEach(func(k int64, v int64) { fmt.Printf("key: %d, value: %d\n", k, v) }) m.Clear() // all gone, but buffers kept ``` -------------------------------- ### Import intmap Package Source: https://pkg.go.dev/github.com/kamstrup/intmap Import the intmap package to use its functionalities. ```go import "github.com/kamstrup/intmap" ``` -------------------------------- ### Create New Set Source: https://pkg.go.dev/github.com/kamstrup/intmap NewSet creates a new Set with a given initial capacity. ```go func NewSet[K IntKey](capacity int) *Set[K] ``` -------------------------------- ### NewSet Source: https://pkg.go.dev/github.com/kamstrup/intmap Creates a new Set with a given initial capacity. ```APIDOC ## NewSet ### Description Creates a new Set with a given initial capacity. ### Method Signature ```go func NewSet[K IntKey](capacity int) *Set[K] ``` ``` -------------------------------- ### Create New Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Creates a new set with keys of any integer subtype. The capacity parameter specifies the initial size before reallocation and rehashing occur. ```go func NewSet[K IntKey](capacity int) *Set[K] ``` -------------------------------- ### New Source: https://pkg.go.dev/github.com/kamstrup/intmap Creates a new map with keys of any integer subtype. The map can store up to the given capacity before reallocation and rehashing occurs. ```APIDOC ## New ### Description Creates a new map with keys being any integer subtype. The map can store up to the given capacity before reallocation and rehashing occurs. ### Signature ```go func New[K IntKey, V any](capacity int) *Map[K, V] ``` ### Parameters - **capacity** (int) - The initial capacity of the map. ``` -------------------------------- ### Add Source: https://pkg.go.dev/github.com/kamstrup/intmap Adds a key to the set. Returns true if the key was not already present. ```APIDOC ## Add ### Description Add adds a key to the set. Returns true if the key was not already present. ### Signature ```go func (s *Set[K]) Add(k K) bool ``` ### Parameters - **k** (K) - The key to add to the set. ``` -------------------------------- ### New Map Creation Source: https://pkg.go.dev/github.com/kamstrup/intmap Creates a new map with keys of any integer subtype. The capacity parameter specifies the initial size before reallocation and rehashing occur. ```go func New[K IntKey, V any](capacity int) *Map[K, V] ``` -------------------------------- ### All Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over the keys in the set. The iteration order is not defined. ```APIDOC ## All ### Description All returns an iterator over the keys from s. The iteration order of a Set is not defined, so please avoid relying on it. ### Signature ```go func (s *Set[K]) All() iter.Seq[K] ``` ``` -------------------------------- ### Iterate Over Set Elements Source: https://pkg.go.dev/github.com/kamstrup/intmap ForEach iterates over the elements in the set while the visit function returns true. This method returns immediately if the set is nil. The iteration order of a Set is not defined, so please avoid relying on it. ```go func (s *Set[K]) ForEach(visit func(k K) bool) ``` -------------------------------- ### Add Element to Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Adds a key to the set. Returns true if the key was added, false if it was already present. ```go func (s *Set[K]) Add(k K) bool ``` -------------------------------- ### Iterate Over Set Elements Source: https://pkg.go.dev/github.com/kamstrup/intmap Iterates through elements in the set, executing the provided function `visit` for each element. The iteration stops if `visit` returns false. Returns immediately if invoked on a nil set. ```go func (s *Set[K]) ForEach(visit func(k K) bool) ``` -------------------------------- ### Set.ForEach Source: https://pkg.go.dev/github.com/kamstrup/intmap Iterates over the elements in the set while the visit function returns true. This method returns immediately if the set is nil. The iteration order of a Set is not defined, so please avoid relying on it. ```APIDOC ## Set.ForEach ### Description Iterates over the elements in the set while the visit function returns true. This method returns immediately if the set is nil. The iteration order of a Set is not defined, so please avoid relying on it. ### Method Signature ```go func (s *Set[K]) ForEach(visit func(k K) bool) ``` ``` -------------------------------- ### NewSet Source: https://pkg.go.dev/github.com/kamstrup/intmap Creates a new set with keys of any integer subtype. The set can store up to the given capacity before reallocation and rehashing occurs. ```APIDOC ## NewSet ### Description NewSet creates a new set with keys being any integer subtype. The set can store up to the given capacity before reallocation and rehashing occurs. ### Signature ```go func NewSet[K IntKey](capacity int) *Set[K] ``` ### Parameters - **capacity** (int) - The initial capacity of the set. ``` -------------------------------- ### Set.Add Source: https://pkg.go.dev/github.com/kamstrup/intmap Adds an element to the set. Returns true if the element was not already present. ```APIDOC ## Set.Add ### Description Adds an element to the set. Returns true if the element was not already present. ### Method Signature ```go func (s *Set[K]) Add(k K) bool ``` ``` -------------------------------- ### ForEach Source: https://pkg.go.dev/github.com/kamstrup/intmap Iterates through the keys in the set while the provided function returns true. Returns immediately if invoked on a nil set. The iteration order is not defined. ```APIDOC ## ForEach ### Description ForEach iterates through the keys in the set while the function visit returns true. This method returns immediately if invoked on a nil set. The iteration order of a Set is not defined, so please avoid relying on it. ### Signature ```go func (s *Set[K]) ForEach(visit func(k K) bool) ``` ### Parameters - **visit** (func(k K) bool) - The function to execute for each key. The iteration stops if this function returns false. ``` -------------------------------- ### PutIfNotExists Source: https://pkg.go.dev/github.com/kamstrup/intmap Inserts a key-value pair only if the key does not already exist. Returns the existing value and true if the key was found, otherwise returns the zero value for V and false. ```APIDOC ## PutIfNotExists ### Description PutIfNotExists inserts a key-value pair only if the key does not already exist. Returns the existing value and true if the key was found, otherwise returns the zero value for V and false. ### Signature ```go func (m *Map[K, V]) PutIfNotExists(key K, val V) (V, bool) ``` ### Parameters - **key** (K) - The key to insert. - **val** (V) - The value to associate with the key if it's not already present. ### Returns - **V** - The existing value if the key was found, otherwise the zero value for V. - **bool** - True if the key was already present, false otherwise. ``` -------------------------------- ### Clear Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Removes all elements from the set, but retains the internal buffers for potential reuse. ```go func (s *Set[K]) Clear() ``` -------------------------------- ### Set.All Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over keys from the set. The iterator returns immediately if the set is nil. The iteration order of a Set is not defined, so please avoid relying on it. ```APIDOC ## Set.All ### Description Returns an iterator over keys from the set. The iterator returns immediately if the set is nil. The iteration order of a Set is not defined, so please avoid relying on it. ### Method Signature ```go func (s *Set[K]) All() iter.Seq[K] ``` ``` -------------------------------- ### Iterate with Callback Function Source: https://pkg.go.dev/github.com/kamstrup/intmap Iterates through key-value pairs in the map, executing the provided function `f` for each pair. The iteration stops if `f` returns false. Returns immediately if invoked on a nil map. Iteration order is not defined. ```go func (m *Map[K, V]) ForEach(f func(K, V) bool) ``` -------------------------------- ### Add Element to Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Add an element to the set. Returns true if the element was not already present. ```go func (s *Set[K]) Add(k K) bool ``` -------------------------------- ### Delete Key from Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Del deletes a key, returning true iff the key was found. ```go func (s *Set[K]) Del(k K) bool ``` -------------------------------- ### Add Key-Value Pair if Not Exists Source: https://pkg.go.dev/github.com/kamstrup/intmap Adds a key-value pair only if the key does not already exist in the map. Returns the existing value and true if the key was found, otherwise returns the zero value for V and false. ```go func (m *Map[K, V]) PutIfNotExists(key K, val V) (V, bool) ``` -------------------------------- ### Iterate Over Key-Value Pairs Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over key-value pairs. The iterator returns immediately if invoked on a nil map. The iteration order is not guaranteed. ```go func (m *Map[K, V]) All() iter.Seq2[K, V] ``` -------------------------------- ### ForEach Source: https://pkg.go.dev/github.com/kamstrup/intmap Iterates through key-value pairs in the map while the provided function returns true. Returns immediately if invoked on a nil map. The iteration order is not defined. ```APIDOC ## ForEach ### Description ForEach iterates through key-value pairs in the map while the function f returns true. This method returns immediately if invoked on a nil map. The iteration order of a Map is not defined, so please avoid relying on it. ### Signature ```go func (m *Map[K, V]) ForEach(f func(K, V) bool) ``` ### Parameters - **f** (func(K, V) bool) - The function to execute for each key-value pair. The iteration stops if this function returns false. ``` -------------------------------- ### Clear Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Clear removes all items from the Set, but keeps the internal buffers for reuse. ```go func (s *Set[K]) Clear() ``` -------------------------------- ### Len Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns the number of elements in the set. Returns 0 if the set is nil. ```APIDOC ## Len ### Description Len returns the number of elements in the set. Returns 0 if the set is nil. ### Signature ```go func (s *Set[K]) Len() int ``` ``` -------------------------------- ### Keys Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over the keys in the map. The iteration order is not defined. ```APIDOC ## Keys ### Description Keys returns an iterator over the keys in the map. The iteration order of a Map is not defined, so please avoid relying on it. ### Signature ```go func (m *Map[K, V]) Keys() iter.Seq[K] ``` ``` -------------------------------- ### Map.Keys Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over keys in m. The iterator returns immediately if invoked on a nil map. The iteration order of a Map is not defined, so please avoid relying on it. ```APIDOC ## Map.Keys ### Description Returns an iterator over keys in m. The iterator returns immediately if invoked on a nil map. The iteration order of a Map is not defined, so please avoid relying on it. ### Method Signature ```go func (m *Map[K, V]) Keys() iter.Seq[K] ``` ``` -------------------------------- ### Put Source: https://pkg.go.dev/github.com/kamstrup/intmap Inserts or updates a key-value pair in the map. ```APIDOC ## Put ### Description Put inserts or updates a key-value pair in the map. ### Signature ```go func (m *Map[K, V]) Put(key K, val V) ``` ### Parameters - **key** (K) - The key to insert or update. - **val** (V) - The value to associate with the key. ``` -------------------------------- ### Has Source: https://pkg.go.dev/github.com/kamstrup/intmap Checks if a key exists in the set. Returns false if the set is nil. ```APIDOC ## Has ### Description Has checks if a key exists in the set. Returns false if the set is nil. ### Signature ```go func (s *Set[K]) Has(k K) bool ``` ### Parameters - **k** (K) - The key to check for existence. ``` -------------------------------- ### Define Set Type Source: https://pkg.go.dev/github.com/kamstrup/intmap Set is a specialization of Map modelling a set of integers. Like Map, methods that read from the set are valid on the nil Set. This include Has, Len, and ForEach. ```go type Set[K IntKey] Map[K, struct{}] ``` -------------------------------- ### Has Source: https://pkg.go.dev/github.com/kamstrup/intmap Checks if a key exists in the map. Returns false if the map is nil. ```APIDOC ## Has ### Description Has checks if a key exists in the map. Returns false if the map is nil. ### Signature ```go func (m *Map[K, V]) Has(key K) bool ``` ### Parameters - **key** (K) - The key to check for existence. ``` -------------------------------- ### Clear Source: https://pkg.go.dev/github.com/kamstrup/intmap Removes all elements from the set, but keeps the internal buffers for reuse. ```APIDOC ## Clear ### Description Clear removes all items from the set, but keeps the internal buffers for reuse. ### Signature ```go func (s *Set[K]) Clear() ``` ``` -------------------------------- ### Map.Put Source: https://pkg.go.dev/github.com/kamstrup/intmap Adds or updates key with value val. ```APIDOC ## Map.Put ### Description Adds or updates key with value val. ### Method Signature ```go func (m *Map[K, V]) Put(key K, val V) ``` ``` -------------------------------- ### Add or Update Key-Value Pair in Map Source: https://pkg.go.dev/github.com/kamstrup/intmap Put adds or updates key with value val. ```go func (m *Map[K, V]) Put(key K, val V) ``` -------------------------------- ### Add or Update Key-Value Pair Source: https://pkg.go.dev/github.com/kamstrup/intmap Adds a new key-value pair to the map or updates the value if the key already exists. This is the primary method for inserting data. ```go func (m *Map[K, V]) Put(key K, val V) ``` -------------------------------- ### Len Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns the number of elements in the map. Returns 0 if the map is nil. ```APIDOC ## Len ### Description Len returns the number of elements in the map. Returns 0 if the map is nil. ### Signature ```go func (m *Map[K, V]) Len() int ``` ``` -------------------------------- ### Add Key-Value Pair if Key Not Exists in Map Source: https://pkg.go.dev/github.com/kamstrup/intmap PutIfNotExists adds the key-value pair only if the key does not already exist in the map, and returns the current value associated with the key and a boolean indicating whether the value was newly added or not. ```go func (m *Map[K, V]) PutIfNotExists(key K, val V) (V, bool) ``` -------------------------------- ### Clear Source: https://pkg.go.dev/github.com/kamstrup/intmap Removes all items from the map, but keeps the internal buffers for reuse. ```APIDOC ## Clear ### Description Clear removes all items from the map, but keeps the internal buffers for reuse. ### Signature ```go func (m *Map[K, V]) Clear() ``` ``` -------------------------------- ### Check Element Existence in Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Checks if an element exists in the set. Returns true if the element is present, otherwise returns false. ```go func (s *Set[K]) Has(k K) bool ``` -------------------------------- ### Set.Len Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns the number of elements in the set. If the set is nil this method return 0. ```APIDOC ## Set.Len ### Description Returns the number of elements in the set. If the set is nil this method return 0. ### Method Signature ```go func (s *Set[K]) Len() int ``` ``` -------------------------------- ### Set.Del Source: https://pkg.go.dev/github.com/kamstrup/intmap Deletes a key, returning true iff the key was found. ```APIDOC ## Set.Del ### Description Deletes a key, returning true iff the key was found. ### Method Signature ```go func (s *Set[K]) Del(k K) bool ``` ``` -------------------------------- ### IntKey Type Constraint Source: https://pkg.go.dev/github.com/kamstrup/intmap Defines the IntKey interface, which is a type constraint for values that can be used as keys in the Map. It includes various signed and unsigned integer types. ```go type IntKey interface { ~int | ~uint | ~int64 | ~uint64 | ~int32 | ~uint32 | ~int16 | ~uint16 | ~int8 | ~uint8 | ~uintptr } ``` -------------------------------- ### Set.Clear Source: https://pkg.go.dev/github.com/kamstrup/intmap Removes all items from the Set, but keeps the internal buffers for reuse. ```APIDOC ## Set.Clear ### Description Removes all items from the Set, but keeps the internal buffers for reuse. ### Method Signature ```go func (s *Set[K]) Clear() ``` ``` -------------------------------- ### All Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over key-value pairs from the map. The iterator returns immediately if invoked on a nil map. The iteration order is not defined. ```APIDOC ## All ### Description Returns an iterator over key-value pairs from m. The iterator returns immediately if invoked on a nil map. The iteration order of a Map is not defined, so please avoid relying on it. ### Signature ```go func (m *Map[K, V]) All() iter.Seq2[K, V] ``` ``` -------------------------------- ### Del Source: https://pkg.go.dev/github.com/kamstrup/intmap Deletes a key and its value, returning true if the key was found. ```APIDOC ## Del ### Description Del deletes a key and its value, returning true iff the key was found. ### Signature ```go func (m *Map[K, V]) Del(key K) bool ``` ### Parameters - **key** (K) - The key to delete. ``` -------------------------------- ### Values Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over the values in the map. The iteration order is not defined. ```APIDOC ## Values ### Description Values returns an iterator over the values in the map. The iteration order of a Map is not defined, so please avoid relying on it. ### Signature ```go func (m *Map[K, V]) Values() iter.Seq[V] ``` ``` -------------------------------- ### Check if Key Exists in Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Has returns true if the key is in the set. If the set is nil this method always return false. ```go func (s *Set[K]) Has(k K) bool ``` -------------------------------- ### Clear Map Contents Source: https://pkg.go.dev/github.com/kamstrup/intmap Removes all items from the map, but retains the internal buffers for potential reuse, which can improve performance by avoiding reallocations. ```go func (m *Map[K, V]) Clear() ``` -------------------------------- ### Map.Values Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns an iterator over values in m. The iterator returns immediately if invoked on a nil map. The iteration order of a Map is not defined, so please avoid relying on it. ```APIDOC ## Map.Values ### Description Returns an iterator over values in m. The iterator returns immediately if invoked on a nil map. The iteration order of a Map is not defined, so please avoid relying on it. ### Method Signature ```go func (m *Map[K, V]) Values() iter.Seq[V] ``` ``` -------------------------------- ### Delete Key-Value Pair Source: https://pkg.go.dev/github.com/kamstrup/intmap Deletes a key and its associated value from the map. Returns true if the key was found and deleted, otherwise returns false. ```go func (m *Map[K, V]) Del(key K) bool ``` -------------------------------- ### Del Source: https://pkg.go.dev/github.com/kamstrup/intmap Deletes a key from the set, returning true if the key was found. ```APIDOC ## Del ### Description Del deletes a key from the set, returning true iff the key was found. ### Signature ```go func (s *Set[K]) Del(k K) bool ``` ### Parameters - **k** (K) - The key to delete from the set. ``` -------------------------------- ### Delete Element from Set Source: https://pkg.go.dev/github.com/kamstrup/intmap Deletes an element from the set. Returns true if the element was found and deleted, otherwise returns false. ```go func (s *Set[K]) Del(k K) bool ``` -------------------------------- ### Map.PutIfNotExists Source: https://pkg.go.dev/github.com/kamstrup/intmap Adds the key-value pair only if the key does not already exist in the map, and returns the current value associated with the key and a boolean indicating whether the value was newly added or not. ```APIDOC ## Map.PutIfNotExists ### Description Adds the key-value pair only if the key does not already exist in the map, and returns the current value associated with the key and a boolean indicating whether the value was newly added or not. ### Method Signature ```go func (m *Map[K, V]) PutIfNotExists(key K, val V) (V, bool) ``` ``` -------------------------------- ### Map.Len Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns the number of elements in the map. The length of a nil map is defined to be zero. ```APIDOC ## Map.Len ### Description Returns the number of elements in the map. The length of a nil map is defined to be zero. ### Method Signature ```go func (m *Map[K, V]) Len() int ``` ``` -------------------------------- ### Set.Has Source: https://pkg.go.dev/github.com/kamstrup/intmap Returns true if the key is in the set. If the set is nil this method always return false. ```APIDOC ## Set.Has ### Description Returns true if the key is in the set. If the set is nil this method always return false. ### Method Signature ```go func (s *Set[K]) Has(k K) bool ``` ``` -------------------------------- ### Map.Has Source: https://pkg.go.dev/github.com/kamstrup/intmap Checks if the given key exists in the map. Calling this method on a nil map will return false. ```APIDOC ## Map.Has ### Description Checks if the given key exists in the map. Calling this method on a nil map will return false. ### Method Signature ```go func (m *Map[K, V]) Has(key K) bool ``` ``` -------------------------------- ### Check if Key Exists in Map Source: https://pkg.go.dev/github.com/kamstrup/intmap Has checks if the given key exists in the map. Calling this method on a nil map will return false. ```go func (m *Map[K, V]) Has(key K) bool ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.