func MapToFields(ctx context.Context, cmd SofaRpcCmd) (map[string]string, error) {
	protocol := cmd.ProtocolCode()

	if conv, ok := sofaConvFactory[protocol]; ok {
		return conv.MapToFields(ctx, cmd)
	}
	return nil, rpc.ErrUnrecognizedCode
}
// MapToFields expect src header data type as `ProtoBasicCmd`
MapToFields expect src header data type as `ProtoBasicCmd`
// MapToFields expect src header data type as ` ProtoBasicCmd `
func MapToFields(ctx context.Context, cmd SofaRpcCmd) (map[string]string, error) {
	protocol := cmd.ProtocolCode()
	if conv, ok := sofaConvFactory[protocol]; ok {
		return conv.MapToFields(ctx, cmd)
	}
	return nil, rpc.ErrUnrecognizedCode
}
func MapToFields ( ctx context . Context , cmd SofaRpcCmd ) ( map [ string ] string , error ) { protocol := cmd . ProtocolCode ( ) if conv , ok := sofaConvFactory [ protocol ] ; ok { return conv . MapToFields ( ctx , cmd ) } return nil , rpc . ErrUnrecognizedCode }
MapToFields expect src header data type as `ProtoBasicCmd`
MapToFields expect src header data type as ` ProtoBasicCmd `