s/\[0:/\[:/g
License: MIT Signed-off-by: rht <rhtbot@gmail.com>
rht committed
Nov 25, 2015 at 16:09 UTC
bf26b59c3754f3ad1d9df004672d74ad817a35e5
4 files changed
+6
-6
commands/cli/parse.go
+1
-1
@@ -187,7 +187,7 @@ func parseOpts(args []string, root *cmds.Command) (
187
}
188
}
189
var end bool
190
- end, err = parseFlag(arg[0:1], rest, mustUse)
190
+ end, err = parseFlag(arg[:1], rest, mustUse)
191
if err != nil {
192
return
193
}
commands/command.go
+1
-1
@@ -156,7 +156,7 @@ func (c *Command) Resolve(pth []string) ([]*Command, error) {
156
cmd = cmd.Subcommand(name)
157
158
if cmd == nil {
159
- pathS := path.Join(pth[0:i])
159
+ pathS := path.Join(pth[:i])
160
return nil, fmt.Errorf("Undefined command: '%s'", pathS)
161
}
162
p2p/crypto/key.go
+2
-2
@@ -216,11 +216,11 @@ func KeyStretcher(cipherType string, hashType string, secret []byte) (StretchedK
216
var k1 StretchedKeys
217
var k2 StretchedKeys
218
219
- k1.IV = r1[0:ivSize]
219
+ k1.IV = r1[:ivSize]
220
k1.CipherKey = r1[ivSize : ivSize+cipherKeySize]
221
k1.MacKey = r1[ivSize+cipherKeySize:]
222
223
- k2.IV = r2[0:ivSize]
223
+ k2.IV = r2[:ivSize]
224
k2.CipherKey = r2[ivSize : ivSize+cipherKeySize]
225
k2.MacKey = r2[ivSize+cipherKeySize:]
226
p2p/peer/addr/addrsrcs_test.go
+2
-2
@@ -43,7 +43,7 @@ func addrSourcesSame(a, b Source) bool {
43
44
func TestAddrCombine(t *testing.T) {
45
addrs := newAddrs(t, 30)
46
- a := Slice(addrs[0:10])
46
+ a := Slice(addrs[:10])
47
b := Slice(addrs[10:20])
48
c := Slice(addrs[20:30])
49
d := CombineSources(a, b, c)
@@ -58,7 +58,7 @@ func TestAddrCombine(t *testing.T) {
58
func TestAddrUnique(t *testing.T) {
59
60
addrs := newAddrs(t, 40)
61
- a := Slice(addrs[0:20])
61
+ a := Slice(addrs[:20])
62
b := Slice(addrs[10:30])
63
c := Slice(addrs[20:40])
64
d := CombineSources(a, b, c)