func (t *defaultTag) Decode(object reflect.Value, field reflect.StructField, property string) (retVal interface{}) {
	tag, ok := field.Tag.Lookup(t.Tag.AtValue)
	if ok {
		kind := field.Type.Kind()
		needConvert := true
		retVal = t.instantiateFactory.Replace(tag)
		switch kind {
		case reflect.Slice:
			typ := reflect.TypeOf(retVal)
			if retVal != tag {
				if typ.Kind() == reflect.Slice {
					needConvert = false
				} else if typ.Kind() == reflect.String {
					needConvert = false
					retVal = str.Convert(retVal.(string), kind)
				}
			}
		case reflect.String:
			needConvert = false
		}
		if needConvert {
			in := fmt.Sprintf("%v", retVal)
			retVal = str.Convert(in, kind)
		}
		if retVal != nil {
			t.instantiateFactory.SetDefaultProperty(property, retVal)
		}
	}
	return retVal
}
func init() {
AddTag(new(defaultTag))
}
package inject
import (
	"fmt"
	"hidevops.io/hiboot/pkg/at"
	"hidevops.io/hiboot/pkg/utils/str"
	"reflect"
)
type defaultTag struct {
	at.Tag `value:"default"`
	BaseTag
}