From 9e95b12d153a9a786626c6879546e822b6e14695 Mon Sep 17 00:00:00 2001 From: Oscar Forner Martinez Date: Tue, 28 Aug 2018 10:40:08 +0100 Subject: [PATCH 1/3] Update Travis-CI to run the test on Go 1.11 too --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 78991a8c1..603df9d11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ go_import_path: github.com/globalsign/mgo go: - 1.9.x - 1.10.x + - 1.11.x env: global: From 961292dc7bdf4a0dfd015448e787701c9879f23c Mon Sep 17 00:00:00 2001 From: Oscar Forner Martinez Date: Tue, 28 Aug 2018 11:15:11 +0100 Subject: [PATCH 2/3] Fix two small errors detected by Go 1.11 --- gridfs.go | 2 +- session.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gridfs.go b/gridfs.go index 0954b166b..e50850437 100644 --- a/gridfs.go +++ b/gridfs.go @@ -678,7 +678,7 @@ func (file *GridFile) insertChunk(data []byte) { // an error, if any. func (file *GridFile) Seek(offset int64, whence int) (pos int64, err error) { file.m.Lock() - debugf("GridFile %p: seeking for %s (whence=%d)", file, offset, whence) + debugf("GridFile %p: seeking for %d (whence=%d)", file, offset, whence) defer file.m.Unlock() switch whence { case os.SEEK_SET: diff --git a/session.go b/session.go index 702b21da7..4a77432c0 100644 --- a/session.go +++ b/session.go @@ -3907,7 +3907,7 @@ func (db *Database) run(socket *mongoSocket, cmd, result interface{}) (err error if result != nil { err = bson.Unmarshal(data, result) if err != nil { - debugf("Run command unmarshaling failed: %#v", op, err) + debugf("Run command unmarshaling: %#v, failed: %#v", op, err) return err } if globalDebug && globalLogger != nil { From e3dcaf6acc910a4d399190b43541c6f0b9076c1c Mon Sep 17 00:00:00 2001 From: Oscar Forner Martinez Date: Tue, 28 Aug 2018 11:42:08 +0100 Subject: [PATCH 3/3] Remove Go 1.9 from the test matrix --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 603df9d11..8aa34f4ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: go go_import_path: github.com/globalsign/mgo go: - - 1.9.x - 1.10.x - 1.11.x @@ -34,7 +33,7 @@ install: before_script: - golint ./... | grep -v 'ID' | cat - - go vet github.com/globalsign/mgo/bson github.com/globalsign/mgo/txn github.com/globalsign/mgo + - go vet github.com/globalsign/mgo/bson github.com/globalsign/mgo/txn github.com/globalsign/mgo - export NOIPV6=1 - make startdb