Clean up documentation examples

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Benji Rewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: