Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Updated to use MongoDB driver v1.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sindbach committed Feb 28, 2022
1 parent 98b3b17 commit 405ff8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Repository to help getting started with MongoDB Go driver connecting to MongoDB

## Information

This Get-Started project uses [MongoDB Go driver](https://godoc.org/go.mongodb.org/mongo-driver/mongo) version 1.6.0 by default. Although you can change the driver version, the provided code example was only tested against the default version of MongoDB driver. There is no guarantee that the code sample will work for all possible versions of the driver.
This Get-Started project uses [MongoDB Go driver](https://godoc.org/go.mongodb.org/mongo-driver/mongo) version 1.8.3 by default. Although you can change the driver version, the provided code example was only tested against the default version of MongoDB driver. There is no guarantee that the code sample will work for all possible versions of the driver.

## Pre-requisites

Expand All @@ -26,7 +26,7 @@ Execute the helper shell script followed by the MongoDB URI that you would like

To use a different driver version, specify the driver version after the MongoDB URI. For example:
```
./get-started.sh "mongodb+srv://usr:[email protected]/dbname?retryWrites=true" 1.5.0
./get-started.sh "mongodb+srv://usr:[email protected]/dbname?retryWrites=true" 1.6.0
```

### Execute commands within the Docker environment
Expand Down
3 changes: 2 additions & 1 deletion get-started.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ then
read -p "MONGODB URI (Required): " MONGODB_URI
fi

DRIVER_VERSION=${2:-1.6.0}
DRIVER_VERSION=${2:-1.8.3}
echo "Executing ... "
docker run --rm -e MONGODB_URI=${MONGODB_URI} \
-v "$(pwd)":/workspace \
-w /workspace/go ghcr.io/mongodb-developer/get-started-go \
"sed -i 's/mongo-driver v[x0-9]\+\.[x0-9]\+\.[x0-9]\+/mongo-driver v${DRIVER_VERSION}/g' /workspace/go/go.mod; \
go mod download all; \
go run getstarted.go"

0 comments on commit 405ff8c

Please sign in to comment.