Skip to content

Commit

Permalink
Merge pull request #14 from eure/patch-1
Browse files Browse the repository at this point in the history
Update vendoring packages
  • Loading branch information
kaneshin authored Nov 5, 2018
2 parents 9a480b3 + 5abe438 commit bda90d2
Show file tree
Hide file tree
Showing 55 changed files with 3,090 additions and 966 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: go
go:
- 1.9
- "1.10"
- tip
dist: trusty
sudo: required
Expand All @@ -12,7 +12,7 @@ addons:
- mysql-client-5.6
env:
global:
- GO15VENDOREXPERIMENT=1
- GO111MODULE=on
- MYSQL_USER=root
- MYSQL_PASSWORD=
- MYSQL_HOST=127.0.0.1
Expand Down
51 changes: 0 additions & 51 deletions Gopkg.lock

This file was deleted.

50 changes: 0 additions & 50 deletions Gopkg.toml

This file was deleted.

1 change: 1 addition & 0 deletions cmd/kamimai/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/eure/kamimai"
"github.com/eure/kamimai/core"
_ "github.com/eure/kamimai/driver"
_ "github.com/go-sql-driver/mysql"
)

var (
Expand Down
1 change: 1 addition & 0 deletions driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"testing"

"github.com/eure/kamimai/core"
_ "github.com/go-sql-driver/mysql"
"github.com/stretchr/testify/assert"
)

Expand Down
11 changes: 5 additions & 6 deletions driver/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"sync"

"github.com/eure/kamimai/core"
"github.com/go-sql-driver/mysql"
)

type (
Expand Down Expand Up @@ -124,7 +123,7 @@ func (d *MySQL) Migrate(m *core.Migration) error {
query = strings.TrimSpace(strings.Join(list, ";"))
}
_, err = d.Exec(query)
if _, isWarn := err.(mysql.MySQLWarnings); err != nil && !isWarn {
if err != nil {
continue
} else {
list = nil
Expand All @@ -140,7 +139,7 @@ func (d *MySQL) Insert(val uint64) error {
versionTableName, val)

_, err := d.Exec(query)
if _, isWarn := err.(mysql.MySQLWarnings); err != nil && !isWarn {
if err != nil {
return err
}
return nil
Expand All @@ -152,7 +151,7 @@ func (d *MySQL) Delete(val uint64) error {
versionTableName, val)

_, err := d.Exec(query)
if _, isWarn := err.(mysql.MySQLWarnings); err != nil && !isWarn {
if err != nil {
return err
}
return nil
Expand Down Expand Up @@ -192,7 +191,7 @@ func (d *MySQL) Create() error {
versionTableName + ` (version BIGINT NOT NULL PRIMARY KEY);`

_, err := d.Exec(query)
if _, isWarn := err.(mysql.MySQLWarnings); err != nil && !isWarn {
if err != nil {
return err
}
return nil
Expand All @@ -203,7 +202,7 @@ func (d *MySQL) Drop() error {
const query = `DROP TABLE IF EXISTS ` + versionTableName

_, err := d.Exec(query)
if _, isWarn := err.(mysql.MySQLWarnings); err != nil && !isWarn {
if err != nil {
return err
}
return nil
Expand Down
12 changes: 12 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module github.com/eure/kamimai

require (
github.com/BurntSushi/toml v0.3.1
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-sql-driver/mysql v1.4.0
github.com/pkg/errors v0.8.0
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2
google.golang.org/appengine v1.3.0 // indirect
gopkg.in/yaml.v2 v2.2.1
)
20 changes: 20 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk=
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
1 change: 1 addition & 0 deletions kamimai_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/eure/kamimai/core"
_ "github.com/eure/kamimai/driver"
_ "github.com/go-sql-driver/mysql"
"github.com/stretchr/testify/assert"
)

Expand Down
27 changes: 17 additions & 10 deletions vendor/github.com/BurntSushi/toml/COPYING

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING

This file was deleted.

2 changes: 1 addition & 1 deletion vendor/github.com/BurntSushi/toml/lex.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/davecgh/go-spew/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bda90d2

Please sign in to comment.