inspect

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetColumns

func GetColumns(v interface{}, alias string, cols []string) []string

func GetFinalType

func GetFinalType(v interface{}) (rt reflect.Type)

func GetIndirectType

func GetIndirectType(v interface{}) (rt reflect.Type)

Types

type SqlTag

type SqlTag struct {
	reflect.StructTag
	// contains filtered or unexported fields
}

StructTag named sql or xorm

func NewSqlTag

func NewSqlTag() *SqlTag

func (*SqlTag) Delete

func (st *SqlTag) Delete(key string)

Deletes a tag

func (*SqlTag) Get

func (st *SqlTag) Get(key string) (string, bool)

Returns a tag from the tag data

func (*SqlTag) ParseTag

func (st *SqlTag) ParseTag(tag reflect.StructTag)

func (*SqlTag) Set

func (st *SqlTag) Set(key, val string)

Sets a tag in the tag data map

func (*SqlTag) String

func (st *SqlTag) String(head string) string

转为字符串格式,头通常使用sql或xorm

Jump to

Keyboard shortcuts

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