Merge pull request #6697 from gyuho/fmt

*: fix gofmt issues with go tip
This commit is contained in:
Gyu-Ho Lee 2016-10-20 17:04:39 -07:00 committed by GitHub
commit b72a413b71
4 changed files with 19 additions and 19 deletions

View File

@ -239,7 +239,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 2}: {},
{main: 2}: {},
},
},
{
@ -255,7 +255,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 2}: {},
{main: 2}: {},
},
},
{
@ -271,7 +271,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 4}: {},
{main: 4}: {},
},
},
{
@ -287,7 +287,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 4}: {},
{main: 4}: {},
},
},
{
@ -328,7 +328,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 8}: {},
{main: 8}: {},
},
},
{
@ -343,7 +343,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 8}: {},
{main: 8}: {},
},
},
{
@ -358,7 +358,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 10}: {},
{main: 10}: {},
},
},
{
@ -373,7 +373,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 10}: {},
{main: 10}: {},
},
},
{
@ -411,7 +411,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 14, sub: 1}: {},
{main: 14, sub: 1}: {},
},
},
{
@ -425,7 +425,7 @@ func TestKeyIndexCompact(t *testing.T) {
},
},
map[revision]struct{}{
revision{main: 14, sub: 1}: {},
{main: 14, sub: 1}: {},
},
},
{
@ -499,7 +499,7 @@ func TestKeyIndexCompactOnFurtherRev(t *testing.T) {
},
}
wam := map[revision]struct{}{
revision{main: 2}: {},
{main: 2}: {},
}
if !reflect.DeepEqual(ki, wki) {
t.Errorf("ki = %+v, want %+v", ki, wki)

View File

@ -48,7 +48,7 @@ func TestScheduleCompaction(t *testing.T) {
{
1,
map[revision]struct{}{
revision{main: 1}: {},
{main: 1}: {},
},
revs,
},
@ -56,8 +56,8 @@ func TestScheduleCompaction(t *testing.T) {
{
3,
map[revision]struct{}{
revision{main: 2}: {},
revision{main: 3}: {},
{main: 2}: {},
{main: 3}: {},
},
revs[1:],
},

View File

@ -329,7 +329,7 @@ func TestStoreCompact(t *testing.T) {
fi := s.kvindex.(*fakeIndex)
s.currentRev = revision{3, 0}
fi.indexCompactRespc <- map[revision]struct{}{revision{1, 0}: {}}
fi.indexCompactRespc <- map[revision]struct{}{{1, 0}: {}}
key1 := newTestKeyBytes(revision{1, 0}, false)
key2 := newTestKeyBytes(revision{2, 0}, false)
b.tx.rangeRespc <- rangeResp{[][]byte{key1, key2}, nil}

View File

@ -28,8 +28,8 @@ func TestURLPickerPickTwice(t *testing.T) {
u := picker.pick()
urlmap := map[url.URL]bool{
url.URL{Scheme: "http", Host: "127.0.0.1:2380"}: true,
url.URL{Scheme: "http", Host: "127.0.0.1:7001"}: true,
{Scheme: "http", Host: "127.0.0.1:2380"}: true,
{Scheme: "http", Host: "127.0.0.1:7001"}: true,
}
if !urlmap[u] {
t.Errorf("url picked = %+v, want a possible url in %+v", u, urlmap)
@ -48,8 +48,8 @@ func TestURLPickerUpdate(t *testing.T) {
u := picker.pick()
urlmap := map[url.URL]bool{
url.URL{Scheme: "http", Host: "localhost:2380"}: true,
url.URL{Scheme: "http", Host: "localhost:7001"}: true,
{Scheme: "http", Host: "localhost:2380"}: true,
{Scheme: "http", Host: "localhost:7001"}: true,
}
if !urlmap[u] {
t.Errorf("url picked = %+v, want a possible url in %+v", u, urlmap)