defaults

package
v1.2.117 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const TagDefault = "default"

Variables

This section is empty.

Functions

func Convert

func Convert(val any, unmarshal func(data []byte, v any) error) error

Convert wrapper of convertState

Types

type Converter

type Converter interface {
	ConvertDefault(val reflect.Value, tag reflect.StructTag) error
}

Converter is the interface implemented by types that can set themselves with default value by struct tag `default`.

Jump to

Keyboard shortcuts

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