<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:03 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[GODRIVER-2630] Use variable name &quot;ctx&quot; in WithSession/WithTransaction callback funcs</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2630</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;We currently document in the &lt;a href=&quot;https://docs.google.com/document/d/1FtUKxOaEmdFf4d3HcXAVIGed2awuwIWdkWc0YQIwPvk/edit#&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Go Driver Code Example Reference&lt;/a&gt; that examples should always use variable name &quot;ctx&quot; for the callback function signatures when using the &lt;tt&gt;mongo.WithSession&lt;/tt&gt; and &lt;tt&gt;Session.WithTransaction&lt;/tt&gt; functions.&lt;/p&gt;

&lt;p&gt;The reason for that guideline is that it helps prevent a common error of using the outer context (i.e. the one from outside the callback func that doesn&apos;t contain the session/transaction information) instead of the inner context from the callback func. Naming the variable &quot;ctx&quot; shadows the context from outside the callback func, preventing that error (assuming users are using the common &quot;ctx&quot; context variable name).&lt;/p&gt;

&lt;p&gt;However, the Go Driver code, Godocs, and example code still uses the &quot;sessCtx&quot; variable name. Update all &quot;sessCtx&quot; variable names to &quot;ctx&quot; to match the Go Driver Code Example Reference doc.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2170992">GODRIVER-2630</key>
            <summary>Use variable name &quot;ctx&quot; in WithSession/WithTransaction callback funcs</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="matt.dale@mongodb.com">Matt Dale</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Mon, 31 Oct 2022 19:06:24 +0000</created>
                <updated>Sat, 28 Oct 2023 11:37:26 +0000</updated>
                            <resolved>Tue, 8 Nov 2022 06:09:49 +0000</resolved>
                                                    <fixVersion>1.12.0</fixVersion>
                    <fixVersion>1.12.0-alpha1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="4961816" author="xgen-internal-githook" created="Tue, 8 Nov 2022 03:13:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Dale&apos;, &apos;email&apos;: &apos;9760375+matthewdale@users.noreply.github.com&apos;, &apos;username&apos;: &apos;matthewdale&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2630&quot; title=&quot;Use variable name &amp;quot;ctx&amp;quot; in WithSession/WithTransaction callback funcs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2630&quot;&gt;&lt;del&gt;GODRIVER-2630&lt;/del&gt;&lt;/a&gt; Rename all instances of sessCtx to ctx and reformat Session documentation. (#1113)&lt;/p&gt;

&lt;p&gt;Co-authored-by: Kevin Albertson &amp;lt;kevin.albertson@10gen.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/71831b2d3c558d77609d4bfd012bb9df07b2a582&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/71831b2d3c558d77609d4bfd012bb9df07b2a582&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0yqts:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>