diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8dd223ad..53eaa0cb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -16,6 +16,8 @@ First of all, run `make deps` to install all dependencies. After that, you have If you have Go, Docker and Docker Compose installed, you can run all tests and linters simply by running `make`. +You can also set `REFORM_TARGET` and `REFORM_IMAGE_VERSION` environment variables to test a specific combination. +See [`.travis.yml`](../.travis.yml) for possible values. ### Direct diff --git a/.github/test-dc.go b/.github/test-dc.go index b44dcb64..530d2f31 100644 --- a/.github/test-dc.go +++ b/.github/test-dc.go @@ -8,6 +8,7 @@ import ( "log" "os" "os/exec" + "strconv" "strings" ) @@ -84,7 +85,7 @@ func gen() { } const filename = ".travis.yml" - const start = "# Generated with 'go run .github/test-dc.go'." + const start = "# Generated with 'go run .github/test-dc.go gen'." b, err := ioutil.ReadFile(filename) if err != nil { log.Fatal(err) @@ -108,12 +109,14 @@ func testOne() { v := os.Getenv("REFORM_IMAGE_VERSION") log.Printf("REFORM_TARGET=%s REFORM_IMAGE_VERSION=%s", t, v) - for _, c := range []string{ - fmt.Sprintf("docker-compose --file=.github/docker-compose-%s.yml --project-name=reform pull", t), - fmt.Sprintf("docker-compose --file=.github/docker-compose-%s.yml --project-name=reform up -d --remove-orphans --force-recreate", t), - fmt.Sprintf("make %s", t), - fmt.Sprintf("docker-compose --file=.github/docker-compose-%s.yml --project-name=reform down --remove-orphans --volumes", t), - } { + var commands []string + if offline, _ := strconv.ParseBool(os.Getenv("REFORM_OFFLINE")); !offline { + commands = append(commands, fmt.Sprintf("docker-compose --file=.github/docker-compose-%s.yml --project-name=reform pull", t)) + } + commands = append(commands, fmt.Sprintf("docker-compose --file=.github/docker-compose-%s.yml --project-name=reform up -d --remove-orphans --force-recreate", t)) + commands = append(commands, fmt.Sprintf("make %s", t)) + commands = append(commands, fmt.Sprintf("docker-compose --file=.github/docker-compose-%s.yml --project-name=reform down --remove-orphans --volumes", t)) + for _, c := range commands { log.Print(c) args := strings.Split(c, " ") cmd := exec.Command(args[0], args[1:]...) diff --git a/.gitignore b/.gitignore index c18de6bd..82e79cee 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .idea/ *.cover coverage.txt +internal/test/sql/*_combined.tmp.sql +reform-database.sqlite3 diff --git a/.travis.yml b/.travis.yml index 7d0e57a5..d26b3f6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,9 @@ sudo: required language: go go: - - 1.7.x - 1.8.x - 1.9.x + - 1.10.x - master go_import_path: gopkg.in/reform.v1 @@ -37,7 +37,7 @@ env: global: - GORACE="halt_on_error=1" - # Generated with 'go run .github/test-dc.go'. + # Generated with 'go run .github/test-dc.go gen'. # 16 combinations: # postgres: 9.3, 9.4, 9.5, 9.6, 10 # mysql, mysql-traditional: 5.5, 5.6, 5.7, 8.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3212a071..0b82bb0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v1.3.2 (2018-07-23, https://github.com/go-reform/reform/milestones/v1.3.2) + +* Go 1.8+ is now required due to changes in github.com/lib/pq driver. +* Fixes in tests for MySQL 8, Go 1.10+ and latest versions of drivers. + ## v1.3.1 (2017-12-07, https://github.com/go-reform/reform/milestones/v1.3.1) * No user-visible changes. diff --git a/Makefile b/Makefile index 2c3afde3..51344ae2 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ deps: go get -u github.com/AlekSi/pointer go get -u github.com/stretchr/testify/... - go get -u github.com/enodata/faker + go get -u syreclabs.com/go/faker go get -u gopkg.in/alecthomas/gometalinter.v1 go get -u github.com/AlekSi/gocoverutil @@ -44,11 +44,19 @@ test-db: internal/test/sql/$(REFORM_DATABASE)_drop.sql reform-db -db-driver="$(REFORM_DRIVER)" -db-source="$(REFORM_ROOT_SOURCE)" exec \ internal/test/sql/$(REFORM_DATABASE)_create.sql - reform-db -db-driver="$(REFORM_DRIVER)" -db-source="$(REFORM_INIT_SOURCE)" exec \ + + # TODO remove that hack in reform 1.4 + # https://github.com/go-reform/reform/issues/151 + # https://github.com/go-reform/reform/issues/157 + cat \ internal/test/sql/$(REFORM_DATABASE)_init.sql \ internal/test/sql/data.sql \ internal/test/sql/$(REFORM_DATABASE)_data.sql \ - internal/test/sql/$(REFORM_DATABASE)_set.sql + internal/test/sql/$(REFORM_DATABASE)_set.sql \ + > internal/test/sql/$(REFORM_DATABASE)_combined.tmp.sql + reform-db -db-driver="$(REFORM_DRIVER)" -db-source="$(REFORM_INIT_SOURCE)" exec \ + internal/test/sql/$(REFORM_DATABASE)_combined.tmp.sql + go test $(REFORM_TEST_FLAGS) -covermode=count -coverprofile=reform-db.cover gopkg.in/reform.v1/reform-db go test $(REFORM_TEST_FLAGS) -covermode=count -coverprofile=reform.cover gocoverutil -coverprofile=coverage.txt merge *.cover @@ -88,11 +96,11 @@ mysql-traditional: test # run unit tests and integration tests for SQLite3 sqlite3: export REFORM_DATABASE = sqlite3 sqlite3: export REFORM_DRIVER = sqlite3 -sqlite3: export REFORM_ROOT_SOURCE = /tmp/reform-database.sqlite3 -sqlite3: export REFORM_INIT_SOURCE = /tmp/reform-database.sqlite3 -sqlite3: export REFORM_TEST_SOURCE = /tmp/reform-database.sqlite3 +sqlite3: export REFORM_ROOT_SOURCE = $(CURDIR)/reform-database.sqlite3 +sqlite3: export REFORM_INIT_SOURCE = $(CURDIR)/reform-database.sqlite3 +sqlite3: export REFORM_TEST_SOURCE = $(CURDIR)/reform-database.sqlite3 sqlite3: test - rm -f /tmp/reform-database.sqlite3 + rm -f $(CURDIR)/reform-database.sqlite3 make test-db # run unit tests and integration tests for SQL Server (mssql driver) @@ -122,7 +130,7 @@ win-mssql: export REFORM_ROOT_SOURCE = server=$(REFORM_SQL_HOST)\$(REFORM_SQL_IN win-mssql: export REFORM_INIT_SOURCE = server=$(REFORM_SQL_HOST)\$(REFORM_SQL_INSTANCE);database=reform-database win-mssql: export REFORM_TEST_SOURCE = server=$(REFORM_SQL_HOST)\$(REFORM_SQL_INSTANCE);database=reform-database win-mssql: test - mingw32-make test-db + make test-db # Windows: run unit tests and integration tests for SQL Server (sqlserver driver) win-sqlserver: REFORM_SQL_HOST ?= 127.0.0.1 @@ -133,6 +141,6 @@ win-sqlserver: export REFORM_ROOT_SOURCE = sqlserver://$(REFORM_SQL_HOST)/$(REFO win-sqlserver: export REFORM_INIT_SOURCE = sqlserver://$(REFORM_SQL_HOST)/$(REFORM_SQL_INSTANCE)?database=reform-database win-sqlserver: export REFORM_TEST_SOURCE = sqlserver://$(REFORM_SQL_HOST)/$(REFORM_SQL_INSTANCE)?database=reform-database win-sqlserver: test - mingw32-make test-db + make test-db .PHONY: docs parse reform reform-db diff --git a/README.md b/README.md index 58aaf6b2..17c03f06 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,14 @@ Supported SQL dialects: | SQLite3 | [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) (`sqlite3`) | | Microsoft SQL Server | [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) (`mssql`, `sqlserver`) | Windows: SQL2008R2SP2, SQL2012SP1, SQL2014, SQL2016. Linux: [`microsoft/mssql-server-linux:latest` Docker image](https://hub.docker.com/r/microsoft/mssql-server-linux/). -Note that for MySQL [`clientFoundRows=true`](https://github.com/go-sql-driver/mysql#clientfoundrows) flag is required. +Notes: +* [`clientFoundRows=true` flag](https://github.com/go-sql-driver/mysql#clientfoundrows) is required for `mysql` driver. +* `mssql` driver is [deprecated](https://github.com/denisenkom/go-mssqldb#deprecated) (but not `sqlserver` driver). + ## Quickstart -1. Make sure you are using Go 1.7+. Install or update `reform` package, `reform` and `reform-db` commands +1. Make sure you are using Go 1.8+. Install or update `reform` package, `reform` and `reform-db` commands (see about versioning below): ``` diff --git a/appveyor.yml b/appveyor.yml index fdfe618b..ebe3a15c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,6 +5,8 @@ clone_folder: c:\gopath\src\gopkg.in\reform.v1 environment: GOPATH: c:\gopath matrix: + - REFORM_TARGET: sqlite3 + - REFORM_SQL_INSTANCE: SQL2008R2SP2 REFORM_TARGET: win-mssql - REFORM_SQL_INSTANCE: SQL2008R2SP2 @@ -26,21 +28,22 @@ environment: REFORM_TARGET: win-sqlserver install: - - powershell -file .github\appveyor-prepare-mssql.ps1 - - set PATH=%PATH%;C:\msys64\mingw64\bin;%GOPATH%\bin + - if defined REFORM_SQL_INSTANCE powershell -file .github\appveyor-prepare-mssql.ps1 + - set PATH=C:\msys64\usr\bin;C:\msys64\mingw64\bin;%GOPATH%\bin;%PATH% + - pacman -Rsc --noconfirm gcc - go version # - echo %PATH% # - go env - # - where mingw32-make + # - where make # - where gcc build_script: - - mingw32-make deps + - make deps test_script: - - mingw32-make %REFORM_TARGET% - - mingw32-make check + - make %REFORM_TARGET% + - make check on_success: - ls -al diff --git a/base_test.go b/base_test.go index 208c2e5c..a45a77e5 100644 --- a/base_test.go +++ b/base_test.go @@ -45,21 +45,30 @@ func checkForeignKeys(t *testing.T, q *reform.Querier) { require.True(t, enabled) } -// setIdentityInsert allows or disallows insertions of rows with set primary keys for MS SQL. -func setIdentityInsert(t *testing.T, q *reform.Querier, table string, allow bool) { +// withIdentityInsert executes an action with MS SQL IDENTITY_INSERT enabled for a table +func withIdentityInsert(t *testing.T, q *reform.Querier, table string, action func()) { if q.Dialect != mssql.Dialect && q.Dialect != sqlserver.Dialect { + action() return } - allowString := "OFF" - if allow { - allowString = "ON" - } - sql := fmt.Sprintf("SET IDENTITY_INSERT %s %s", q.QuoteIdentifier(table), allowString) - _, err := q.Exec(sql) + query := fmt.Sprintf("SET IDENTITY_INSERT %s %%s", q.QuoteIdentifier(table)) + + _, err := q.Exec(fmt.Sprintf(query, "ON")) + require.NoError(t, err) + + action() + + _, err = q.Exec(fmt.Sprintf(query, "OFF")) require.NoError(t, err) } +func insertPersonWithID(t *testing.T, q *reform.Querier, str reform.Struct) error { + var err error + withIdentityInsert(t, q, "people", func() { err = q.Insert(str) }) + return err +} + type ReformSuite struct { suite.Suite tx *reform.TX @@ -80,8 +89,6 @@ func (s *ReformSuite) SetupTest() { s.Require().NoError(err) s.q = s.tx.WithTag("test") - - setIdentityInsert(s.T(), s.q, "people", false) } func (s *ReformSuite) TearDownTest() { @@ -161,8 +168,6 @@ func (s *ReformSuite) TestPlaceholders() { } func (s *ReformSuite) TestTimezones() { - setIdentityInsert(s.T(), s.q, "people", true) - t1 := time.Now() t2 := t1.UTC() vlat, err := time.LoadLocation("Asia/Vladivostok") @@ -176,8 +181,11 @@ func (s *ReformSuite) TestTimezones() { q := fmt.Sprintf(`INSERT INTO people (id, name, created_at) VALUES `+ `(11, '11', %s), (12, '12', %s), (13, '13', %s), (14, '14', %s)`, s.q.Placeholder(1), s.q.Placeholder(2), s.q.Placeholder(3), s.q.Placeholder(4)) - _, err := s.q.Exec(q, t1, t2, tVLAT, tHST) - s.NoError(err) + + withIdentityInsert(s.T(), s.q, "people", func() { + _, err := s.q.Exec(q, t1, t2, tVLAT, tHST) + s.NoError(err) + }) q = `SELECT created_at, created_at FROM people WHERE id IN (11, 12, 13, 14) ORDER BY id` rows, err := s.q.Query(q) @@ -200,8 +208,11 @@ func (s *ReformSuite) TestTimezones() { q := fmt.Sprintf(`INSERT INTO projects (id, name, start) VALUES `+ `('11', '11', %s), ('12', '12', %s), ('13', '13', %s), ('14', '14', %s)`, s.q.Placeholder(1), s.q.Placeholder(2), s.q.Placeholder(3), s.q.Placeholder(4)) - _, err := s.q.Exec(q, t1, t2, tVLAT, tHST) - s.NoError(err) + + withIdentityInsert(s.T(), s.q, "people", func() { + _, err := s.q.Exec(q, t1, t2, tVLAT, tHST) + s.NoError(err) + }) q = `SELECT start, start FROM projects WHERE id IN ('11', '12', '13', '14') ORDER BY id` rows, err := s.q.Query(q) diff --git a/db_test.go b/db_test.go index 5bb051d9..54117b2b 100644 --- a/db_test.go +++ b/db_test.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/AlekSi/pointer" - "github.com/enodata/faker" + "syreclabs.com/go/faker" "gopkg.in/reform.v1" "gopkg.in/reform.v1/dialects/postgresql" @@ -15,13 +15,11 @@ func (s *ReformSuite) TestBeginCommit() { s.Require().NoError(s.tx.Rollback()) s.q = nil - setIdentityInsert(s.T(), DB.Querier, "people", true) - person := &Person{ID: 42, Email: pointer.ToString(faker.Internet().Email())} tx, err := DB.Begin() s.Require().NoError(err) - s.NoError(tx.Insert(person)) + s.NoError(insertPersonWithID(s.T(), tx.Querier, person)) s.NoError(tx.Commit()) s.Equal(tx.Commit(), reform.ErrTxDone) s.Equal(tx.Rollback(), reform.ErrTxDone) @@ -33,13 +31,11 @@ func (s *ReformSuite) TestBeginRollback() { s.Require().NoError(s.tx.Rollback()) s.q = nil - setIdentityInsert(s.T(), DB.Querier, "people", true) - person := &Person{ID: 42, Email: pointer.ToString(faker.Internet().Email())} tx, err := DB.Begin() s.Require().NoError(err) - s.NoError(tx.Insert(person)) + s.NoError(insertPersonWithID(s.T(), tx.Querier, person)) s.NoError(tx.Rollback()) s.Equal(tx.Commit(), reform.ErrTxDone) s.Equal(tx.Rollback(), reform.ErrTxDone) @@ -55,17 +51,15 @@ func (s *ReformSuite) TestErrorInTransaction() { s.Require().NoError(s.tx.Rollback()) s.q = nil - setIdentityInsert(s.T(), DB.Querier, "people", true) - person1 := &Person{ID: 42, Email: pointer.ToString(faker.Internet().Email())} person2 := &Person{ID: 43, Email: pointer.ToString(faker.Internet().Email())} // commit works tx, err := DB.Begin() s.Require().NoError(err) - s.NoError(tx.Insert(person1)) - s.Error(tx.Insert(person1)) // duplicate PK - s.NoError(tx.Insert(person2)) // INSERT works + s.NoError(insertPersonWithID(s.T(), tx.Querier, person1)) + s.Error(insertPersonWithID(s.T(), tx.Querier, person1)) // duplicate PK + s.NoError(insertPersonWithID(s.T(), tx.Querier, person2)) // INSERT works s.NoError(tx.Commit()) s.Equal(tx.Commit(), reform.ErrTxDone) s.Equal(tx.Rollback(), reform.ErrTxDone) @@ -77,9 +71,9 @@ func (s *ReformSuite) TestErrorInTransaction() { // rollback works tx, err = DB.Begin() s.Require().NoError(err) - s.NoError(tx.Insert(person1)) - s.Error(tx.Insert(person1)) // duplicate PK - s.NoError(tx.Insert(person2)) // INSERT works + s.NoError(insertPersonWithID(s.T(), tx.Querier, person1)) + s.Error(insertPersonWithID(s.T(), tx.Querier, person1)) // duplicate PK + s.NoError(insertPersonWithID(s.T(), tx.Querier, person2)) // INSERT works s.NoError(tx.Rollback()) s.Equal(tx.Commit(), reform.ErrTxDone) s.Equal(tx.Rollback(), reform.ErrTxDone) @@ -97,17 +91,15 @@ func (s *ReformSuite) TestAbortedTransaction() { s.Require().NoError(s.tx.Rollback()) s.q = nil - setIdentityInsert(s.T(), DB.Querier, "people", true) - person1 := &Person{ID: 42, Email: pointer.ToString(faker.Internet().Email())} person2 := &Person{ID: 43, Email: pointer.ToString(faker.Internet().Email())} // commit fails tx, err := DB.Begin() s.Require().NoError(err) - s.NoError(tx.Insert(person1)) - s.EqualError(tx.Insert(person1), `pq: duplicate key value violates unique constraint "people_pkey"`) - s.EqualError(tx.Insert(person2), `pq: current transaction is aborted, commands ignored until end of transaction block`) + s.NoError(insertPersonWithID(s.T(), tx.Querier, person1)) + s.EqualError(insertPersonWithID(s.T(), tx.Querier, person1), `pq: duplicate key value violates unique constraint "people_pkey"`) + s.EqualError(insertPersonWithID(s.T(), tx.Querier, person2), `pq: current transaction is aborted, commands ignored until end of transaction block`) s.EqualError(tx.Commit(), `pq: Could not complete operation in a failed transaction`) s.Equal(tx.Rollback(), reform.ErrTxDone) s.EqualError(DB.Reload(person1), reform.ErrNoRows.Error()) @@ -116,9 +108,9 @@ func (s *ReformSuite) TestAbortedTransaction() { // rollback works tx, err = DB.Begin() s.Require().NoError(err) - s.NoError(tx.Insert(person1)) - s.EqualError(tx.Insert(person1), `pq: duplicate key value violates unique constraint "people_pkey"`) - s.EqualError(tx.Insert(person2), `pq: current transaction is aborted, commands ignored until end of transaction block`) + s.NoError(insertPersonWithID(s.T(), tx.Querier, person1)) + s.EqualError(insertPersonWithID(s.T(), tx.Querier, person1), `pq: duplicate key value violates unique constraint "people_pkey"`) + s.EqualError(insertPersonWithID(s.T(), tx.Querier, person2), `pq: current transaction is aborted, commands ignored until end of transaction block`) s.NoError(tx.Rollback()) s.Equal(tx.Commit(), reform.ErrTxDone) s.Equal(tx.Rollback(), reform.ErrTxDone) @@ -130,13 +122,11 @@ func (s *ReformSuite) TestInTransaction() { s.Require().NoError(s.tx.Rollback()) s.q = nil - setIdentityInsert(s.T(), DB.Querier, "people", true) - person := &Person{ID: 42, Email: pointer.ToString(faker.Internet().Email())} // error in closure err := DB.InTransaction(func(tx *reform.TX) error { - s.NoError(tx.Insert(person)) + s.NoError(insertPersonWithID(s.T(), tx.Querier, person)) return errors.New("epic error") }) s.EqualError(err, "epic error") @@ -145,7 +135,7 @@ func (s *ReformSuite) TestInTransaction() { // panic in closure s.Panics(func() { err = DB.InTransaction(func(tx *reform.TX) error { - s.NoError(tx.Insert(person)) + s.NoError(insertPersonWithID(s.T(), tx.Querier, person)) panic("epic panic!") }) }) @@ -153,8 +143,8 @@ func (s *ReformSuite) TestInTransaction() { // duplicate PK in closure err = DB.InTransaction(func(tx *reform.TX) error { - s.NoError(tx.Insert(person)) - err := tx.Insert(person) + s.NoError(insertPersonWithID(s.T(), tx.Querier, person)) + err := insertPersonWithID(s.T(), tx.Querier, person) s.Error(err) return err }) @@ -163,7 +153,7 @@ func (s *ReformSuite) TestInTransaction() { // no error err = DB.InTransaction(func(tx *reform.TX) error { - s.NoError(tx.Insert(person)) + s.NoError(insertPersonWithID(s.T(), tx.Querier, person)) return nil }) s.NoError(err) diff --git a/doc.go b/doc.go index 5fc03a42..5e9c8d09 100644 --- a/doc.go +++ b/doc.go @@ -22,4 +22,4 @@ package reform // import "gopkg.in/reform.v1" // Version defines reform version. -const Version = "v1.3.1" +const Version = "v1.3.2" diff --git a/querier_commands_test.go b/querier_commands_test.go index 33820e9b..8ed56359 100644 --- a/querier_commands_test.go +++ b/querier_commands_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/AlekSi/pointer" - "github.com/enodata/faker" + "syreclabs.com/go/faker" "gopkg.in/reform.v1" "gopkg.in/reform.v1/dialects/postgresql" @@ -53,11 +53,9 @@ func (s *ReformSuite) TestInsertWithValues() { } func (s *ReformSuite) TestInsertWithPrimaryKey() { - setIdentityInsert(s.T(), s.q, "people", true) - newEmail := faker.Internet().Email() person := &Person{ID: 50, Email: &newEmail} - err := s.q.Insert(person) + err := insertPersonWithID(s.T(), s.q, person) s.NoError(err) s.Equal(int32(50), person.ID) s.Equal("", person.Name) @@ -163,13 +161,14 @@ func (s *ReformSuite) TestInsertMulti() { } func (s *ReformSuite) TestInsertMultiWithPrimaryKeys() { - setIdentityInsert(s.T(), s.q, "people", true) - newEmail := faker.Internet().Email() newName := faker.Name().Name() person1, person2 := &Person{ID: 50, Email: &newEmail}, &Person{ID: 51, Name: newName} - err := s.q.InsertMulti(person1, person2) - s.NoError(err) + + withIdentityInsert(s.T(), s.q, "people", func() { + err := s.q.InsertMulti(person1, person2) + s.NoError(err) + }) s.Equal(int32(50), person1.ID) s.Equal("", person1.Name) @@ -365,15 +364,16 @@ func (s *ReformSuite) TestSave() { } func (s *ReformSuite) TestSaveWithPrimaryKey() { - setIdentityInsert(s.T(), s.q, "people", true) - newName := faker.Name().Name() person := &Person{ID: 99, Name: newName} - err := s.q.Save(person) - s.NoError(err) + + withIdentityInsert(s.T(), s.q, "people", func() { + err := s.q.Save(person) + s.NoError(err) + }) // that should cause no-op UPDATE, see https://github.com/go-reform/reform/issues/131 - err = s.q.Save(person) + err := s.q.Save(person) s.NoError(err) } diff --git a/querier_examples_test.go b/querier_examples_test.go index 82446236..d99660ab 100644 --- a/querier_examples_test.go +++ b/querier_examples_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/AlekSi/pointer" - "github.com/enodata/faker" + "syreclabs.com/go/faker" "gopkg.in/reform.v1" "gopkg.in/reform.v1/dialects/postgresql" diff --git a/reform/version_check.go b/reform/version_check.go index b6fb02fe..f39471e7 100644 --- a/reform/version_check.go +++ b/reform/version_check.go @@ -1,4 +1,4 @@ -// +build !go1.7 +// +build !go1.8 package main @@ -8,5 +8,5 @@ import ( ) func init() { - log.Fatalf("reform requires Go 1.7+, but was compiled with %s.", runtime.Version()) + log.Fatalf("reform requires Go 1.8+, but was compiled with %s.", runtime.Version()) }