util

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0, CC-BY-4.0, MIT Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2025 The Go MCP SDK Authors. All rights reserved. Use of this source code is governed by the license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLoopback added in v1.4.0

func IsLoopback(addr string) bool

func KeySlice

func KeySlice[M ~map[K]V, K comparable, V any](m M) []K

KeySlice returns the keys of the map M, like slices.Collect(maps.Keys(m)).

func Sorted

func Sorted[M ~map[K]V, K cmp.Ordered, V any](m M) iter.Seq2[K, V]

Sorted returns an iterator over the entries of m in key order.

func Wrapf

func Wrapf(errp *error, format string, args ...any)

Wrapf wraps *errp with the given formatted message if *errp is not nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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