func FromError(err error) (s *Status, ok bool) {
	if err == nil {
		return nil, true
	}
	if se, ok := err.(interface {
		GRPCStatus() *Status
	}); ok {
		return se.GRPCStatus(), true
	}
	return New(codes.Unknown, err.Error()), false
}
FromError returns a Status representing err if it was produced by this
package or has a method `GRPCStatus() *Status`.
If err is nil, a Status is returned with codes.OK and no message.
Otherwise, ok is false and a Status is returned with codes.Unknown and
the original error message.
package status
import (
	"context"
	"fmt"
	spb "google.golang.org/genproto/googleapis/rpc/status"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/internal/status"
)
type Status = status.Status
func New(c codes.Code, msg string) *Status {
	return status.New(c, msg)
}
func Newf(c codes.Code, format string, a ...interface{}) *Status {
	return New(c, fmt.Sprintf(format, a...))
}
func Error(c codes.Code, msg string) error {
	return New(c, msg).Err()
}
func Errorf(c codes.Code, format string, a ...interface{}) error {
	return Error(c, fmt.Sprintf(format, a...))
}
func ErrorProto(s *spb.Status) error {
	return FromProto(s).Err()
}
func FromProto(s *spb.Status) *Status {
	return status.FromProto(s)
}