func Decode(m interface{}, rawVal interface{}) error {
	config := &DecoderConfig{
		Metadata: nil,
		Result:   rawVal,
	}
	decoder, err := NewDecoder(config)
	if err != nil {
		return err
	}
	return decoder.Decode(m)
}
Decode takes a map and uses reflection to convert it into the
given Go native structure. val must be a pointer to a struct.
package mapstructure
import (
	"encoding/json"
	"errors"
	"fmt"
	"reflect"
	"sort"
	"strconv"
	"strings"
)
type DecodeHookFunc interface{}
type DecodeHookFuncType func(reflect.Type, reflect.Type, interface{}) (interface{}, error)
type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error)
type DecoderConfig struct {
	DecodeHook DecodeHookFunc
	ErrorUnused bool
	ZeroFields bool
	WeaklyTypedInput bool
	Metadata *Metadata
	Result interface{}
	TagName string
}
type Decoder struct {
	config *DecoderConfig
}
type Metadata struct {
	Keys []string
	Unused []string
}