Skip to content

Instantly share code, notes, and snippets.

@xiachengjia
xiachengjia / main.go
Created December 19, 2018 06:26
go module bug with github.com/ugorji/go
// export GO111MODULE=on
// go mod init main
// go build ./...
package main
import (
"fmt"
"go.etcd.io/etcd/client"
"os"
)
@xiachengjia
xiachengjia / main.go
Created December 23, 2018 07:04
go module bug with github.com/ugorji/go
// $ ./bin/etcd -version
// etcd Version: 3.3.0+git
// Git SHA: 9113019
// Go Version: go1.11.4
// Go OS/Arch: linux/amd64
// # run etcd with default
// $ ./bin/etcd
// $ export GO111MODULE=on
@xiachengjia
xiachengjia / main.go
Created April 12, 2019 04:01
mysql5.7 'ON DUPLICATE KEY UPDATE' syntax will update extra column even if you haven't updated
package mysql_bug
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/stretchr/testify/require"
"testing"
"time"
)