Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2010

Clean up documentation examples

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Documentation
    • None
    • Not Needed

      documentation_examples/examples.go is getting pretty large (~2700 LoC). Depending on how the Docs team references these examples, we could split the file into smaller files within the same directory. This might make these examples more accessible to users.

      Furthermore, we should make sure that all examples are actually being run through example_test.go. RunTransactionWithRetry(), CommitWithRetry(), and WithTransactionExample() are not actually tested.

      Finally add a README or at least document that these examples are pulled in automatically by the Docs team.

      Also, try to adhere to the new document on Go driver example code (e.g. use context.TODO() everywhere.

            Assignee:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Reporter:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: