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: decoder_util.go
    path of file: ./repos/aws-sdk-go-v2/aws/protocol/restjson
    
    the code of the file until where you have to start completion: package restjson

import (
	"encoding/json"
	"io"
	"strings"

	"github.com/aws/smithy-go"
)

// GetErrorInfo util looks for code, __type, and message members in the
// json body. These members are optionally available, and the function
// returns the value of member if it is available. This function is useful to
// identify 
    
func GetErrorInfo(decoder *json.Decoder) (errorType string, message string, err error) {
	var errInfo struct {
		Code    string
		Type    string `json:"__type"`
		Message string
	}

	err = decoder.Decode(&errInfo)
	if err != nil {
		if err == io.EOF {
			return errorType, message, nil
		}
		return errorType, message, err
	}

	// assign error type
	if len(errInfo.Code) != 0 {
		errorType = errInfo.Code
	} else if len(errInfo.Type) != 0 {
		errorType = errInfo.Type
	}

	// assign error message
	if len(errInfo.Message) != 0 {
		message = errInfo.Message
	}

	// sanitize error
	if len(errorType) != 0 {
		errorType = SanitizeErrorCode(errorType)
	}

	return errorType, message, nil
}