Help us shape the future of Go! Take the 2026 Go Developer Survey

loose

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package loose reads decoded JSON or YAML as plain maps and lists, so a field another tool adds in a later version does not stop an import.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flag

func Flag(v any) bool

Flag is v as a boolean, false when it is not one.

func List

func List(v any) []map[string]any

List is the objects of v; anything else in the list is dropped.

func Map

func Map(v any) map[string]any

Map is v as an object, nil when it is not one.

func SortedKeys

func SortedKeys(m map[string]any) []string

SortedKeys are the keys of m in order, so output does not depend on map order.

func Str

func Str(v any) string

Str is a scalar as text ("" for nothing); numbers and booleans as written.

Types

This section is empty.

Jump to

Keyboard shortcuts

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