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: assert.go
    path of file: ./repos/docker-ce/components/engine/vendor/gotest.tools/v3/internal/assert
    
    the code of the file until where you have to start completion: package assert

import (
	"fmt"
	"go/ast"
	"go/token"
	"reflect"

	"gotest.tools/v
    
func failureMsgFromError(err error) string {
	// Handle errors with non-nil types
	v := reflect.ValueOf(err)
	if v.Kind() == reflect.Ptr && v.IsNil() {
		return fmt.Sprintf("error is not nil: error has type %T", err)
	}
	return "error is not nil: " + err.Error()
}