func (ds *DynamicStruct) IsPtr() bool {
	return ds.isPtr
}
IsPtr reports whether the built struct type is pointer.
package dynamicstruct
import (
	"errors"
	"fmt"
	"reflect"
	"sort"
	"strings"
	"github.com/iancoleman/strcase"
	"github.com/mitchellh/mapstructure"
)
type DynamicStruct struct {
	name   string
	fields []reflect.StructField
	rt     reflect.Type
	isPtr  bool
	def string
}
func newDynamicStruct(fields []reflect.StructField, isPtr bool) *DynamicStruct {
	return newDynamicStructWithName(fields, isPtr, defaultStructName)
}
func newDynamicStructWithName(fields []reflect.StructField, isPtr bool, name string) *DynamicStruct {
	return &DynamicStruct{
		name:   name,
		fields: fields,
		rt:     reflect.StructOf(fields),
		isPtr:  isPtr,
	}
}
func (ds *DynamicStruct) Name() string {
	return ds.name
}
func (ds *DynamicStruct) Type() reflect.Type {
	return ds.rt
}
func (ds *DynamicStruct) NumField() int {
	return ds.rt.NumField()
}
func (ds *DynamicStruct) Fields() []reflect.StructField {
	return ds.fields
}
func (ds *DynamicStruct) Field(i int) reflect.StructField {
	return ds.rt.Field(i)
}
func (ds *DynamicStruct) FieldByName(name string) (reflect.StructField, bool) {
	return ds.rt.FieldByName(name)
}