You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: types.go
    path of file: ./repos/evmos/ethereum/eip712
    
    the code of the file until where you have to start completion: // Copyright Tharsis Labs Ltd.(Evmos)
// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE)
package eip712

import (
	"bytes"
	"fmt"
	"sort"
	"strings"

	"golang.org/x/text/cases"
	"golang.org/x/text/language"

	errorsmod "cosmoss
    
func msgRootType(msg gjson.Result) (string, error) {
	msgType := msg.Get(msgTypeField).Str
	if msgType == "" {
		// .Str is empty for arrays and objects
		return "", errorsmod.Wrap(errortypes.ErrInvalidType, "malformed message type value, expected type string")
	}

	// Convert e.g. cosmos-sdk/MsgSend to TypeMsgSend
	typeTokenized := strings.Split(msgType, "/")
	msgSignature := typeTokenized[len(typeTokenized)-1]
	rootType := fmt.Sprintf("%v%v", typePrefix, msgSignature)

	return rootType, nil
}