Affected by GO-2025-3548
and 8 other vulnerabilities
GO-2025-3548 : Ollama Vulnerable to Denial of Service (DoS) via Crafted GZIP in github.com/ollama/ollama
GO-2025-3557 : Ollama Allocation of Resources Without Limits or Throttling vulnerability in github.com/ollama/ollama
GO-2025-3558 : Ollama Allows Out-of-Bounds Read in github.com/ollama/ollama
GO-2025-3559 : Ollama Divide By Zero vulnerability in github.com/ollama/ollama
GO-2025-3582 : Ollama Denial of Service (DoS) via Null Pointer Dereference in github.com/ollama/ollama
GO-2025-3689 : Ollama Divide by Zero Vulnerability in github.com/ollama/ollama
GO-2025-3695 : Ollama Server Vulnerable to Denial of Service (DoS) Attack in github.com/ollama/ollama
GO-2025-3824 : Ollama vulnerable to Cross-Domain Token Exposure in github.com/ollama/ollama
GO-2025-4251 : Ollama has missing authentication enabling attackers to perform model management operations in github.com/ollama/ollama
Discover Packages
github.com/ollama/ollama
internal
orderedmap
package
Version:
v0.17.7
Opens a new window with list of versions in this module.
Published: Mar 6, 2026
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package orderedmap provides a generic ordered map that maintains insertion order.
It wraps github.com/wk8/go-ordered-map/v2 to encapsulate the dependency.
type Map
func (m *Map[K, V]) All() iter.Seq2[K, V]
func (m *Map[K, V]) Get(key K) (V, bool)
func (m *Map[K, V]) Len() int
func (m *Map[K, V]) MarshalJSON() ([]byte, error)
func (m *Map[K, V]) Set(key K, value V)
func (m *Map[K, V]) ToMap() map[K]V
func (m *Map[K, V]) UnmarshalJSON(data []byte) error
Map is a generic ordered map that maintains insertion order.
New creates a new empty ordered map.
All returns an iterator over all key-value pairs in insertion order.
func (m *Map [K, V]) Get(key K) (V, bool )
Get retrieves a value by key.
Len returns the number of entries.
MarshalJSON implements json.Marshaler. The JSON output preserves key order.
func (m *Map [K, V]) Set(key K, value V)
Set sets a key-value pair. If the key already exists, its value is updated
but its position in the iteration order is preserved. If the key is new,
it is appended to the end.
func (m *Map [K, V]) ToMap() map[K]V
ToMap converts to a regular Go map.
Note: The resulting map does not preserve order.
UnmarshalJSON implements json.Unmarshaler. The insertion order matches the
order of keys in the JSON input.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.