structs

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Deprecated: structs is deprecated - use github.com/neticdk/go-stdlib/xstructs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMap deprecated

func ToMap(obj any) (map[string]any, error)

Deprecated: ToMap is deprecated - use github.com/neticdk/go-stdlib/xstructs.ToMap ToMap converts a struct or map to a map[string]any. It handles nested structs, maps, and slices. It uses the "json" and "yaml" tags to determine the key names. It respects the "omitempty" tag for fields. It respects the "inline" tag for nested structs. It respects the "-" tag to omit fields.

If the input is nil, it returns nil. If the input is not a struct or map, it returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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