Skip to content

Commit 196952d

Browse files
committed
Regenerate snippets
1 parent e12b1cd commit 196952d

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

generated-usage-examples/go/atlas-sdk-go/project-copy/README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,9 @@ and improvements to existing code.
5252
- Service account credentials with appropriate permissions. See
5353
[Service Account Overview](https://www.mongodb.com/docs/atlas/api/service-accounts-overview/).
5454

55-
## Setup
55+
## Setting Environment Variables
5656

57-
1. Clone the repository:
58-
```bash
59-
git clone https://github.com/mongodb/atlas-architecture-go-sdk.git
60-
cd atlas-architecture-go-sdk
61-
```
62-
63-
2. Create a `.env` file in the root directory with your MongoDB Atlas service account credentials:
57+
1. Create a `.env` file in the root directory with your MongoDB Atlas service account credentials:
6458
```dotenv
6559
MONGODB_ATLAS_SERVICE_ACCOUNT_ID=your_service_account_id
6660
MONGODB_ATLAS_SERVICE_ACCOUNT_SECRET=your_service_account_secret
@@ -69,7 +63,7 @@ and improvements to existing code.
6963
> instead of environment variables.
7064
> See [Secrets management](https://www.mongodb.com/docs/atlas/architecture/current/auth/#secrets-management).
7165
72-
3. Configure Atlas details in `configs/config.json`:
66+
2. Configure Atlas details in `configs/config.json`:
7367
```json
7468
{
7569
"MONGODB_ATLAS_BASE_URL": "<optional-base-url>",
@@ -81,11 +75,6 @@ and improvements to existing code.
8175
```
8276
> **NOTE:** The base URL defaults to `https://cloud.mongodb.com` if not specified.
8377
84-
4. Install dependencies:
85-
```bash
86-
go mod tidy
87-
```
88-
8978
## Running Examples
9079

9180
Examples in this project are intended to be run as individual scripts.

generated-usage-examples/go/atlas-sdk-go/project-copy/internal/billing/crossorg.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ func GetCrossOrgBilling(ctx context.Context, sdk admin.InvoicesApi, p *admin.Lis
1919
return nil, internal.FormatAPIError("list invoices", p.OrgId, err)
2020
}
2121

22+
crossOrgBilling := make(map[string][]admin.BillingInvoiceMetadata)
2223
if r == nil || !r.HasResults() || len(r.GetResults()) == 0 {
23-
return make(map[string][]admin.BillingInvoiceMetadata), nil
24+
return crossOrgBilling, nil
2425
}
2526

26-
crossOrgBilling := make(map[string][]admin.BillingInvoiceMetadata)
2727
crossOrgBilling[p.OrgId] = r.GetResults()
2828
for _, invoice := range r.GetResults() {
2929
if !invoice.HasLinkedInvoices() || len(invoice.GetLinkedInvoices()) == 0 {

0 commit comments

Comments
 (0)