fix: dep ensure. now without gofmt on ventor directory
This commit is contained in:
+1
-1
@@ -457,7 +457,7 @@ func (c *Client) GetMulti(keys []string) (map[string]*Item, error) {
|
||||
}
|
||||
|
||||
var err error
|
||||
for range keyMap {
|
||||
for _ = range keyMap {
|
||||
if ge := <-ch; ge != nil {
|
||||
err = ge
|
||||
}
|
||||
|
||||
+1
-1
@@ -582,7 +582,7 @@ type Rows struct {
|
||||
|
||||
func (rc *Rows) Close() error {
|
||||
rc.cancel()
|
||||
for range rc.tokchan {
|
||||
for _ = range rc.tokchan {
|
||||
}
|
||||
rc.tokchan = nil
|
||||
return nil
|
||||
|
||||
+2
-2
@@ -166,7 +166,7 @@ func writePrelogin(w *tdsBuffer, fields map[uint8][]byte) error {
|
||||
w.BeginPacket(packPrelogin, false)
|
||||
offset := uint16(5*len(fields) + 1)
|
||||
keys := make(KeySlice, 0, len(fields))
|
||||
for k := range fields {
|
||||
for k, _ := range fields {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Sort(keys)
|
||||
@@ -1147,7 +1147,7 @@ func dialConnection(ctx context.Context, p connectParams) (conn net.Conn, err er
|
||||
}
|
||||
// Wait for either the *first* successful connection, or all the errors
|
||||
wait_loop:
|
||||
for i := range ips {
|
||||
for i, _ := range ips {
|
||||
select {
|
||||
case conn = <-connChan:
|
||||
// Got a connection to use, close any others
|
||||
|
||||
+1
-1
@@ -567,7 +567,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
|
||||
// so they don't block since it is an io.Pipe
|
||||
defer func() {
|
||||
go func() {
|
||||
for range linesCh {
|
||||
for _ = range linesCh {
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ func NewRPCClient(conn io.ReadWriteCloser, plugins map[string]Plugin) (*RPCClien
|
||||
|
||||
// Connect stdout, stderr streams
|
||||
stdstream := make([]net.Conn, 2)
|
||||
for i := range stdstream {
|
||||
for i, _ := range stdstream {
|
||||
stdstream[i], err = mux.Open()
|
||||
if err != nil {
|
||||
mux.Close()
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ func (s *RPCServer) ServeConn(conn io.ReadWriteCloser) {
|
||||
|
||||
// Connect the stdstreams (in, out, err)
|
||||
stdstream := make([]net.Conn, 2)
|
||||
for i := range stdstream {
|
||||
for i, _ := range stdstream {
|
||||
stdstream[i], err = mux.Accept()
|
||||
if err != nil {
|
||||
mux.Close()
|
||||
|
||||
+13
-13
@@ -85,7 +85,7 @@ func (dmp *DiffMatchPatch) diffMainRunes(text1, text2 []rune, checklines bool, d
|
||||
|
||||
// Restore the prefix and suffix.
|
||||
if len(commonprefix) != 0 {
|
||||
diffs = append([]Diff{{DiffEqual, string(commonprefix)}}, diffs...)
|
||||
diffs = append([]Diff{Diff{DiffEqual, string(commonprefix)}}, diffs...)
|
||||
}
|
||||
if len(commonsuffix) != 0 {
|
||||
diffs = append(diffs, Diff{DiffEqual, string(commonsuffix)})
|
||||
@@ -122,16 +122,16 @@ func (dmp *DiffMatchPatch) diffCompute(text1, text2 []rune, checklines bool, dea
|
||||
}
|
||||
// Shorter text is inside the longer text (speedup).
|
||||
return []Diff{
|
||||
{op, string(longtext[:i])},
|
||||
{DiffEqual, string(shorttext)},
|
||||
{op, string(longtext[i+len(shorttext):])},
|
||||
Diff{op, string(longtext[:i])},
|
||||
Diff{DiffEqual, string(shorttext)},
|
||||
Diff{op, string(longtext[i+len(shorttext):])},
|
||||
}
|
||||
} else if len(shorttext) == 1 {
|
||||
// Single character string.
|
||||
// After the previous speedup, the character can't be an equality.
|
||||
return []Diff{
|
||||
{DiffDelete, string(text1)},
|
||||
{DiffInsert, string(text2)},
|
||||
Diff{DiffDelete, string(text1)},
|
||||
Diff{DiffInsert, string(text2)},
|
||||
}
|
||||
// Check to see if the problem can be split in two.
|
||||
} else if hm := dmp.diffHalfMatch(text1, text2); hm != nil {
|
||||
@@ -145,7 +145,7 @@ func (dmp *DiffMatchPatch) diffCompute(text1, text2 []rune, checklines bool, dea
|
||||
diffsA := dmp.diffMainRunes(text1A, text2A, checklines, deadline)
|
||||
diffsB := dmp.diffMainRunes(text1B, text2B, checklines, deadline)
|
||||
// Merge the results.
|
||||
return append(diffsA, append([]Diff{{DiffEqual, string(midCommon)}}, diffsB...)...)
|
||||
return append(diffsA, append([]Diff{Diff{DiffEqual, string(midCommon)}}, diffsB...)...)
|
||||
} else if checklines && len(text1) > 100 && len(text2) > 100 {
|
||||
return dmp.diffLineMode(text1, text2, deadline)
|
||||
}
|
||||
@@ -330,8 +330,8 @@ func (dmp *DiffMatchPatch) diffBisect(runes1, runes2 []rune, deadline time.Time)
|
||||
}
|
||||
// Diff took too long and hit the deadline or number of diffs equals number of characters, no commonality at all.
|
||||
return []Diff{
|
||||
{DiffDelete, string(runes1)},
|
||||
{DiffInsert, string(runes2)},
|
||||
Diff{DiffDelete, string(runes1)},
|
||||
Diff{DiffInsert, string(runes2)},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ func (dmp *DiffMatchPatch) DiffCleanupSemantic(diffs []Diff) []Diff {
|
||||
insPoint := equalities.data
|
||||
diffs = append(
|
||||
diffs[:insPoint],
|
||||
append([]Diff{{DiffDelete, lastequality}}, diffs[insPoint:]...)...)
|
||||
append([]Diff{Diff{DiffDelete, lastequality}}, diffs[insPoint:]...)...)
|
||||
|
||||
// Change second copy to insert.
|
||||
diffs[insPoint+1].Type = DiffInsert
|
||||
@@ -726,7 +726,7 @@ func (dmp *DiffMatchPatch) DiffCleanupSemantic(diffs []Diff) []Diff {
|
||||
// Overlap found. Insert an equality and trim the surrounding edits.
|
||||
diffs = append(
|
||||
diffs[:pointer],
|
||||
append([]Diff{{DiffEqual, insertion[:overlapLength1]}}, diffs[pointer:]...)...)
|
||||
append([]Diff{Diff{DiffEqual, insertion[:overlapLength1]}}, diffs[pointer:]...)...)
|
||||
|
||||
diffs[pointer-1].Text =
|
||||
deletion[0 : len(deletion)-overlapLength1]
|
||||
@@ -955,7 +955,7 @@ func (dmp *DiffMatchPatch) DiffCleanupEfficiency(diffs []Diff) []Diff {
|
||||
|
||||
// Duplicate record.
|
||||
diffs = append(diffs[:insPoint],
|
||||
append([]Diff{{DiffDelete, lastequality}}, diffs[insPoint:]...)...)
|
||||
append([]Diff{Diff{DiffDelete, lastequality}}, diffs[insPoint:]...)...)
|
||||
|
||||
// Change second copy to insert.
|
||||
diffs[insPoint+1].Type = DiffInsert
|
||||
@@ -1028,7 +1028,7 @@ func (dmp *DiffMatchPatch) DiffCleanupMerge(diffs []Diff) []Diff {
|
||||
if x > 0 && diffs[x-1].Type == DiffEqual {
|
||||
diffs[x-1].Text += string(textInsert[:commonlength])
|
||||
} else {
|
||||
diffs = append([]Diff{{DiffEqual, string(textInsert[:commonlength])}}, diffs...)
|
||||
diffs = append([]Diff{Diff{DiffEqual, string(textInsert[:commonlength])}}, diffs...)
|
||||
pointer++
|
||||
}
|
||||
textInsert = textInsert[commonlength:]
|
||||
|
||||
+2
-2
@@ -93,7 +93,7 @@ func (dmp *DiffMatchPatch) PatchAddContext(patch Patch, text string) Patch {
|
||||
// Add the prefix.
|
||||
prefix := text[max(0, patch.Start2-padding):patch.Start2]
|
||||
if len(prefix) != 0 {
|
||||
patch.diffs = append([]Diff{{DiffEqual, prefix}}, patch.diffs...)
|
||||
patch.diffs = append([]Diff{Diff{DiffEqual, prefix}}, patch.diffs...)
|
||||
}
|
||||
// Add the suffix.
|
||||
suffix := text[patch.Start2+patch.Length1 : min(len(text), patch.Start2+patch.Length1+padding)]
|
||||
@@ -336,7 +336,7 @@ func (dmp *DiffMatchPatch) PatchAddPadding(patches []Patch) string {
|
||||
// Add some padding on start of first diff.
|
||||
if len(patches[0].diffs) == 0 || patches[0].diffs[0].Type != DiffEqual {
|
||||
// Add nullPadding equality.
|
||||
patches[0].diffs = append([]Diff{{DiffEqual, nullPadding}}, patches[0].diffs...)
|
||||
patches[0].diffs = append([]Diff{Diff{DiffEqual, nullPadding}}, patches[0].diffs...)
|
||||
patches[0].Start1 -= paddingLength // Should be 0.
|
||||
patches[0].Start2 -= paddingLength // Should be 0.
|
||||
patches[0].Length1 += paddingLength
|
||||
|
||||
Reference in New Issue
Block a user