func (b *Builder) AddStructWithTag(name string, i interface{}, isPtr bool, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{i},
		pattern: patternStruct,
		isPtr:   isPtr,
		tag:     tag,
	}
	b.add(p)
	return b
}
AddStructWithTag returns a Builder that was added a struct field with tag named by name parameter.
Type of struct is type of i.
package dynamicstruct
import (
	"errors"
	"reflect"
	"github.com/goldeneggg/structil/util"
)
type pattern int
const (
	defaultStructName = "DynamicStruct"
	SampleString = ""
	SampleInt = int(1)
	SampleByte = byte(1)
	SampleFloat32 = float32(1.1)
	SampleFloat64 = float64(1.1)
	SampleBool = false
	patternMap pattern = iota
	patternFunc
	patternChanBoth
	patternChanRecv
	patternChanSend
	patternStruct
	patternSlice
	patternPrmtv
	patternInterface
	patternDynamicStruct
)
var (
	ErrSample = errors.New("SampleError")
)
type Builder struct {
	name   string
	fields map[string]reflect.Type
	tags   map[string]reflect.StructTag  
	err    error
}
func NewBuilder() *Builder {
	return &Builder{
		name:   defaultStructName,
		fields: map[string]reflect.Type{},
		tags:   map[string]reflect.StructTag{},
	}
}
type addParam struct {
	name     string
	intfs    []interface{}
	keyIntfs []interface{}
	pattern  pattern
	isPtr    bool
	tag      string
}
func (b *Builder) AddString(name string) *Builder {
	b.AddStringWithTag(name, "")
	return b
}
func (b *Builder) AddStringWithTag(name string, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{SampleString},
		pattern: patternPrmtv,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddInt(name string) *Builder {
	b.AddIntWithTag(name, "")
	return b
}
func (b *Builder) AddIntWithTag(name string, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{SampleInt},
		pattern: patternPrmtv,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddByte(name string) *Builder {
	b.AddByteWithTag(name, "")
	return b
}
func (b *Builder) AddByteWithTag(name string, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{SampleByte},
		pattern: patternPrmtv,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddFloat32(name string) *Builder {
	b.AddFloat32WithTag(name, "")
	return b
}
func (b *Builder) AddFloat32WithTag(name string, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{SampleFloat32},
		pattern: patternPrmtv,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddFloat64(name string) *Builder {
	b.AddFloat64WithTag(name, "")
	return b
}
func (b *Builder) AddFloat64WithTag(name string, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{SampleFloat64},
		pattern: patternPrmtv,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddBool(name string) *Builder {
	b.AddBoolWithTag(name, "")
	return b
}
func (b *Builder) AddBoolWithTag(name string, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{SampleBool},
		pattern: patternPrmtv,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddMap(name string, ki interface{}, vi interface{}) *Builder {
	b.AddMapWithTag(name, ki, vi, "")
	return b
}
func (b *Builder) AddMapWithTag(name string, ki interface{}, vi interface{}, tag string) *Builder {
	p := &addParam{
		name:     name,
		intfs:    []interface{}{vi},
		keyIntfs: []interface{}{ki},
		pattern:  patternMap,
		isPtr:    false,
		tag:      tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddFunc(name string, in []interface{}, out []interface{}) *Builder {
	b.AddFuncWithTag(name, in, out, "")
	return b
}
func (b *Builder) AddFuncWithTag(name string, in []interface{}, out []interface{}, tag string) *Builder {
	p := &addParam{
		name:     name,
		intfs:    out,
		keyIntfs: in,
		pattern:  patternFunc,
		isPtr:    false,
		tag:      tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddChanBoth(name string, i interface{}) *Builder {
	b.AddChanBothWithTag(name, i, "")
	return b
}
func (b *Builder) AddChanBothWithTag(name string, i interface{}, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{i},
		pattern: patternChanBoth,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddChanRecv(name string, i interface{}) *Builder {
	b.AddChanRecvWithTag(name, i, "")
	return b
}
func (b *Builder) AddChanRecvWithTag(name string, i interface{}, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{i},
		pattern: patternChanRecv,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddChanSend(name string, i interface{}) *Builder {
	b.AddChanSendWithTag(name, i, "")
	return b
}
func (b *Builder) AddChanSendWithTag(name string, i interface{}, tag string) *Builder {
	p := &addParam{
		name:    name,
		intfs:   []interface{}{i},
		pattern: patternChanSend,
		isPtr:   false,
		tag:     tag,
	}
	b.add(p)
	return b
}
func (b *Builder) AddStruct(name string, i interface{}, isPtr bool) *Builder {
	b.AddStructWithTag(name, i, isPtr, "")
	return b
}