Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bsondump/main/bsondump.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func main() {
opts, err := bsondump.ParseOptions(os.Args[1:], VersionStr, GitCommit)
if err != nil {
log.Logvf(log.Always, "%v", err)
log.Logvf(log.Always, util.ShortUsage("bsondump"))
log.Logvf(log.Always, "%v", util.ShortUsage("bsondump"))
os.Exit(util.ExitFailure)
}

Expand Down
6 changes: 3 additions & 3 deletions common/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,20 +564,20 @@ func LogSensitiveOptionWarnings(args []string) {

// Log a message for --password, if specified.
if tempOpts.Password != "" {
log.Logvf(log.Always, passwordMsg)
log.Logvf(log.Always, "%v", passwordMsg)
}

// Log a message for --uri or a positional connection string, if either is specified.
uri := tempOpts.ConnectionString
if uri != "" {
if cs, err := connstring.Parse(uri); err == nil && cs.Password != "" {
log.Logvf(log.Always, uriMsg)
log.Logvf(log.Always, "%v", uriMsg)
}
}

// Log a message for --sslPEMKeyPassword, if specified.
if tempOpts.SSLPEMKeyPassword != "" {
log.Logvf(log.Always, sslMsg)
log.Logvf(log.Always, "%v", sslMsg)
}
}

Expand Down
8 changes: 4 additions & 4 deletions cyclonedx.sbom.json
Original file line number Diff line number Diff line change
Expand Up @@ -800,17 +800,17 @@
"version": "v2.4.0"
},
{
"bom-ref": "pkg:golang/std@go1.23.12",
"bom-ref": "pkg:golang/std@go1.25.1",
"externalReferences": [
{
"type": "website",
"url": "https://pkg.go.dev/None/std@go1.23.12"
"url": "https://pkg.go.dev/None/std@go1.25.1"
}
],
"name": "std",
"purl": "pkg:golang/std@go1.23.12",
"purl": "pkg:golang/std@go1.25.1",
"type": "library",
"version": "go1.23.12"
"version": "go1.25.1"
}
],
"dependencies": [
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/mongodb/mongo-tools

go 1.23.0
go 1.25.0

toolchain go1.23.8
toolchain go1.25.1

require (
github.com/craiggwilson/goke v0.0.0-20240206162536-b1c58122d943
Expand Down
2 changes: 1 addition & 1 deletion mongodump/main/mongodump.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {
opts, err := mongodump.ParseOptions(os.Args[1:], VersionStr, GitCommit)
if err != nil {
log.Logvf(log.Always, "error parsing command line options: %s", err.Error())
log.Logvf(log.Always, util.ShortUsage("mongodump"))
log.Logvf(log.Always, "%v", util.ShortUsage("mongodump"))
os.Exit(util.ExitFailure)
}

Expand Down
4 changes: 2 additions & 2 deletions mongodump_passthrough/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ functions:
# XXX - Since mise is scoped to the Mongosync repo root, we cannot easily use it to build things
# outside that root. It'd be nice if the migration-verifier also used mise too, but for now this
# works okay.
PATH=$PATH:$HOME:/opt/golang/go1.23/bin
GOROOT=/opt/golang/go1.23
PATH=$PATH:$HOME:/opt/golang/go1.25/bin
GOROOT=/opt/golang/go1.25
./build.sh
# upload the compiled verifier to S3.
- command: s3.put
Expand Down
2 changes: 1 addition & 1 deletion mongoexport/main/mongoexport.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func main() {
opts, err := mongoexport.ParseOptions(os.Args[1:], VersionStr, GitCommit)
if err != nil {
log.Logvf(log.Always, "error parsing command line options: %v", err)
log.Logvf(log.Always, util.ShortUsage("mongoexport"))
log.Logvf(log.Always, "%v", util.ShortUsage("mongoexport"))
os.Exit(util.ExitFailure)
}

Expand Down
2 changes: 1 addition & 1 deletion mongofiles/main/mongofiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func main() {
if err != nil {
log.Logv(log.Always, err.Error())
if setupErr, ok := err.(util.SetupError); ok && setupErr.Message != "" {
log.Logvf(log.Always, setupErr.Message)
log.Logvf(log.Always, "%v", setupErr.Message)
}
os.Exit(util.ExitFailure)
}
Expand Down
4 changes: 2 additions & 2 deletions mongofiles/mongofiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func (mf *MongoFiles) handleDeleteID() error {
if err := file.Delete(); err != nil {
return err
}
log.Logvf(log.Always, fmt.Sprintf("successfully deleted file with _id %v from GridFS", mf.Id))
log.Logvf(log.Always, "%v", fmt.Sprintf("successfully deleted file with _id %v from GridFS", mf.Id))

return nil
}
Expand Down Expand Up @@ -392,7 +392,7 @@ func (mf *MongoFiles) writeGFSFileToLocal(gridFile *gfsFile) (err error) {
return fmt.Errorf("error while writing Data into local file '%v': %v", localFileName, err)
}

log.Logvf(log.Always, fmt.Sprintf("finished writing to %s\n", localFileName))
log.Logvf(log.Always, "%v", fmt.Sprintf("finished writing to %s\n", localFileName))
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions mongoimport/main/mongoimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func main() {
opts, err := mongoimport.ParseOptions(os.Args[1:], VersionStr, GitCommit)
if err != nil {
log.Logvf(log.Always, "error parsing command line options: %v", err)
log.Logvf(log.Always, util.ShortUsage("mongoimport"))
log.Logvf(log.Always, "%v", util.ShortUsage("mongoimport"))
os.Exit(util.ExitFailure)
}

Expand All @@ -43,7 +43,7 @@ func main() {

m, err := mongoimport.New(opts)
if err != nil {
log.Logvf(log.Always, err.Error())
log.Logvf(log.Always, "%v", err.Error())
os.Exit(util.ExitFailure)
}
defer m.Close()
Expand Down
4 changes: 2 additions & 2 deletions mongorestore/main/mongorestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func main() {

if err != nil {
log.Logvf(log.Always, "error parsing command line options: %s", err.Error())
log.Logvf(log.Always, util.ShortUsage("mongorestore"))
log.Logvf(log.Always, "%v", util.ShortUsage("mongorestore"))
os.Exit(util.ExitFailure)
}

Expand All @@ -41,7 +41,7 @@ func main() {

restore, err := mongorestore.New(opts)
if err != nil {
log.Logvf(log.Always, err.Error())
log.Logvf(log.Always, "%v", err.Error())
os.Exit(util.ExitFailure)
}
defer restore.Close()
Expand Down
2 changes: 1 addition & 1 deletion mongostat/main/mongostat.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func main() {
opts, err := mongostat.ParseOptions(os.Args[1:], VersionStr, GitCommit)
if err != nil {
log.Logvf(log.Always, "error parsing command line options: %s", err.Error())
log.Logvf(log.Always, util.ShortUsage("mongostat"))
log.Logvf(log.Always, "%v", util.ShortUsage("mongostat"))
os.Exit(util.ExitFailure)
}

Expand Down
2 changes: 1 addition & 1 deletion mongotop/main/mongotop.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func main() {
opts, err := mongotop.ParseOptions(os.Args[1:], VersionStr, GitCommit)
if err != nil {
log.Logvf(log.Always, "error parsing command line options: %s", err.Error())
log.Logvf(log.Always, util.ShortUsage("mongotop"))
log.Logvf(log.Always, "%v", util.ShortUsage("mongotop"))
os.Exit(util.ExitFailure)
}

Expand Down
2 changes: 1 addition & 1 deletion release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ func buildDeb() {
for _, path := range md5sumsOrder {
md5sum, ok := md5sums[path]
if !ok {
log.Fatalf("could not find md5sum for " + path)
log.Fatalf("%v", "could not find md5sum for " + path)
}
_, err = f.WriteString(md5sum + " ")
check(err, "write md5sum to md5sums")
Expand Down
6 changes: 3 additions & 3 deletions set_goenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ set_goenv() {
UNAME_S=$(PATH="/usr/bin:/bin" uname -s)
case $UNAME_S in
CYGWIN*)
PREF_GOROOT="c:/golang/go1.23"
PREF_PATH="/cygdrive/c/golang/go1.22/bin:/cygdrive/c/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev1/mingw64/bin:$PATH"
PREF_GOROOT="c:/golang/go1.25"
PREF_PATH="/cygdrive/c/golang/go1.25/bin:/cygdrive/c/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev1/mingw64/bin:$PATH"
;;
*)
PREF_GOROOT="/opt/golang/go1.23"
PREF_GOROOT="/opt/golang/go1.25"
PREF_PATH="$PREF_GOROOT/bin:$PATH"
;;
esac
Expand Down