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: secret.go
    path of file: ./repos/istio/istioctl/pkg/util/configdump
    
    the code of the file until where you have to start completion: // Copyright Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
    
func (w *Wrapper) GetRootCAFromSecretConfigDump(anySec *anypb.Any) (string, error) {
	var secret extapi.Secret
	if err := anySec.UnmarshalTo(&secret); err != nil {
		return "", fmt.Errorf("failed to unmarshall ROOTCA secret: %v", err)
	}
	var returnStr string
	var returnErr error
	rCASecret := secret.GetValidationContext()
	if rCASecret != nil {
		trustCA := rCASecret.GetTrustedCa()
		if trustCA != nil {
			inlineBytes := trustCA.GetInlineBytes()
			if inlineBytes != nil {
				returnStr = base64.StdEncoding.EncodeToString(inlineBytes)
				returnErr = nil
			} else {
				returnStr = ""
				returnErr = fmt.Errorf("can not retrieve inlineBytes from trustCA section")
			}
		} else {
			returnStr = ""
			returnErr = fmt.Errorf("can not retrieve trustedCa from secret ROOTCA")
		}
	} else {
		returnStr = ""
		returnErr = fmt.Errorf("can not find ROOTCA from secret config dump")
	}
	return returnStr, returnErr
}