Skip to content

Commit

Permalink
Merge branch 'v1' of github.com:mongodb/mongo-go-driver into GODRIVER…
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Oct 16, 2023
2 parents c5d4eae + 0bb308c commit 84f14c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ functions:
"iam_auth_ecs_secret_access_key" : "${iam_auth_ecs_secret_access_key}",
"iam_auth_ecs_account_arn": "arn:aws:iam::557821124784:user/authtest_fargate_user",
"iam_auth_ecs_cluster": "${iam_auth_ecs_cluster}",
"iam_auth_ecs_task_definition": "${iam_auth_ecs_task_definition}",
"iam_auth_ecs_task_definition": "${iam_auth_ecs_task_definition_ubuntu2004}",
"iam_auth_ecs_subnet_a": "${iam_auth_ecs_subnet_a}",
"iam_auth_ecs_subnet_b": "${iam_auth_ecs_subnet_b}",
"iam_auth_ecs_security_group": "${iam_auth_ecs_security_group}",
Expand Down Expand Up @@ -782,7 +782,7 @@ functions:
silent: true
script: |
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
alias urlencode='python -c "import sys, urllib as ul; sys.stdout.write(ul.quote_plus(sys.argv[1]))"'
alias urlencode='python3 -c "import sys, urllib.parse as ulp; sys.stdout.write(ulp.quote_plus(sys.argv[1]))"'
USER=$(urlencode ${iam_auth_ecs_account})
PASS=$(urlencode ${iam_auth_ecs_secret_access_key})
MONGODB_URI="mongodb://$USER:$PASS@localhost"
Expand Down Expand Up @@ -816,8 +816,8 @@ functions:
script: |
# DO NOT ECHO WITH XTRACE
cat <<'EOF' > "${PROJECT_DIRECTORY}/prepare_mongodb_aws.sh"
alias urlencode='python -c "import sys, urllib as ul; sys.stdout.write(ul.quote_plus(sys.argv[1]))"'
alias jsonkey='python -c "import json,sys;sys.stdout.write(json.load(sys.stdin)[sys.argv[1]])" < ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json'
alias urlencode='python3 -c "import sys, urllib.parse as ulp; sys.stdout.write(ulp.quote_plus(sys.argv[1]))"'
alias jsonkey='python3 -c "import json,sys;sys.stdout.write(json.load(sys.stdin)[sys.argv[1]])" < ${DRIVERS_TOOLS}/.evergreen/auth_aws/creds.json'
USER=$(jsonkey AccessKeyId)
USER=$(urlencode $USER)
PASS=$(jsonkey SecretAccessKey)
Expand Down Expand Up @@ -2400,11 +2400,9 @@ axes:
GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
GO_DIST: "C:\\golang\\go1.20"
SKIP_ECS_AUTH_TEST: true
# TODO(BUILD-17329): Update this to Ubuntu 22 after we add a new ECS task
# definition.
- id: "ubuntu1804-64-go-1-20"
display_name: "Ubuntu 18.04"
run_on: ubuntu1804-test
- id: "ubuntu2004-64-go-1-20"
display_name: "Ubuntu 20.04"
run_on: ubuntu2004-test
variables:
GO_DIST: "/opt/golang/go1.20"
- id: "macos11-go-1-20"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ The Go Driver supports the following compression algorithms:

Compression can be enabled using the `compressors` parameter on the connection string or by using [`ClientOptions.SetCompressors`](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo/options#ClientOptions.SetCompressors):

```
```go
opts := options.Client().ApplyURI("mongodb://localhost:27017/?compressors=snappy,zlib,zstd")
client, _ := mongo.Connect(context.TODO(), opts)
```

```
```go
opts := options.Client().SetCompressors([]string{"snappy", "zlib", "zstd"})
client, _ := mongo.Connect(context.TODO(), opts)
```
Expand Down

0 comments on commit 84f14c3

Please sign in to comment.