Movatterモバイル変換


[0]ホーム

URL:


mak

package
v1.92.2Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:0Imported by:75

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package mak helps make maps. It contains generic helpers to make/assignthings, notably to maps, but also slices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcNonNilMapForJSONadded inv1.32.0

func NonNilMapForJSON[Kcomparable, Vany, M ~map[K]V](mapPtr *M)

NonNilMapForJSON makes sure that *slicePtr is non-nil so it willwon't be omitted from JSON serialization and possibly confuse JavaScriptclients expecting it to be present.

funcNonNilSliceForJSONadded inv1.32.0

func NonNilSliceForJSON[Tany, S ~[]T](slicePtr *S)

NonNilSliceForJSON makes sure that *slicePtr is non-nil so it willwon't be omitted from JSON serialization and possibly confuse JavaScriptclients expecting it to be present.

funcSet

func Set[Kcomparable, Vany, T ~map[K]V](m *T, k K, v V)

Set populates an entry in a map, making the map if necessary.

That is, it assigns (*m)[k] = v, making *m if it was nil.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp