gmeta

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package gmeta provides embedded meta data feature for struct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Data

func Data(object interface{}) map[string]interface{}

Data retrieves and returns all meta data from `object`. It automatically parses and caches the tag string from "Mata" attribute as its meta data.

func Get

func Get(object interface{}, key string) *gvar.Var

Get retrieves and returns specified meta data by `key` from `object`.

Types

type Meta

type Meta struct{}

Meta is used as an embedded attribute for struct to enabled meta data feature.

Jump to

Keyboard shortcuts

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