Skip to content

Commit 10f68c9

Browse files
authored
Revert "CLOUDP-237245: Add example for retrying requests " (#299)
1 parent 9b4a386 commit 10f68c9

File tree

11 files changed

+14
-137
lines changed

11 files changed

+14
-137
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ updates:
55
schedule:
66
interval: weekly
77
day: monday
8-
- package-ecosystem: gomod
9-
directory: "/examples"
10-
schedule:
11-
interval: monthly
12-
ignore:
13-
- dependency-name: "*"
148
- package-ecosystem: github-actions
159
directory: "/"
1610
schedule:

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: lint
2121
uses: golangci/[email protected]
2222
with:
23-
version: v1.57.1
23+
version: v1.52.2
2424
args: --timeout=10m
2525

2626
tests-on-unix:

.golangci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ linters-settings:
2020
- typeAssertChain
2121
gocyclo:
2222
min-complexity: 15
23+
govet:
24+
check-shadowing: true
25+
maligned:
26+
suggest-new: true
2327
revive:
2428
# see https://github.com/mgechev/revive#available-rules for details.
2529
ignore-generated-header: true
@@ -69,7 +73,7 @@ linters:
6973
disable-all: true
7074
enable:
7175
- bodyclose # checks whether HTTP response body is closed successfully [fast: false, auto-fix: false]
72-
#- depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: false, auto-fix: false]
76+
- depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: false, auto-fix: false]
7377
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false]
7478
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false]
7579
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. [fast: false, auto-fix: false]

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
golang 1.22.1
1+
golang 1.20
22
nodejs 18.18.2
33

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SOURCE_FILES?=./...
2-
GOLANGCI_VERSION=v1.57.1
2+
GOLANGCI_VERSION=v1.52.2
33
COVERAGE=coverage.out
44

55
export GO111MODULE := on

examples/README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Go SDK examples
1+
## Go SDK examples
22

33
## Running Examples
44

@@ -11,6 +11,7 @@ export MONGODB_ATLAS_PRIVATE_KEY=some-secret-key-for-gosdkapi
1111
go run ./aws_cluster/aws.go
1212
```
1313

14+
1415
## Running Examples with Mocked Backend
1516

1617
SDK provides mocks using Testify and Mockery.
@@ -19,13 +20,3 @@ One of the SDK examples covers usage of the mockery within tests.
1920
```bash
2021
go test ./mock/cluster_test.go
2122
```
22-
23-
## Examples Reference
24-
25-
### Retry Example
26-
27-
Example provides automatic retries for all HTTP 500, 429 HTTP status errors.
28-
29-
```bash
30-
go run ./retry/retry.go
31-
```

examples/go.mod

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/go.sum

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/retry/retry.go

Lines changed: 0 additions & 71 deletions
This file was deleted.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module go.mongodb.org/atlas-sdk/v20231115008
22

3-
go 1.22.1
3+
go 1.20
44

55
require (
66
github.com/go-test/deep v1.1.0
7-
github.com/mongodb-forks/digest v1.1.0
7+
github.com/mongodb-forks/digest v1.0.5
88
)
99

1010
require (

0 commit comments

Comments
 (0)