2021-01-17 21:46:25 +08:00
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
2019-07-04 11:11:41 +08:00
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
2021-08-08 13:10:21 +08:00
// Package structs provides functions for struct information retrieving and struct conversion.
2020-11-08 14:25:17 +08:00
//
// Inspired and improved from: https://github.com/fatih/structs
2019-07-04 11:11:41 +08:00
package structs
2020-11-08 14:25:17 +08:00
import (
"reflect"
)
2019-07-04 11:11:41 +08:00
2021-02-07 21:23:09 +08:00
// Type wraps reflect.Type for additional features.
type Type struct {
reflect . Type
}
2020-11-08 14:25:17 +08:00
// Field contains information of a struct field .
2019-12-12 23:38:46 +08:00
type Field struct {
2021-02-08 17:57:21 +08:00
Value reflect . Value // The underlying value of the field.
Field reflect . StructField // The underlying field of the field.
TagValue string // Retrieved tag value. There might be more than one tags in the field, but only one can be retrieved according to calling function rules.
2019-12-12 23:38:46 +08:00
}