Skip to content

Commit

Permalink
s/\[0:/\[:/g
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
  • Loading branch information
rht committed Nov 25, 2015
1 parent d6891f4 commit 2ffef14
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion commands/cli/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func parseOpts(args []string, root *cmds.Command) (
}
}
var end bool
end, err = parseFlag(arg[0:1], rest, mustUse)
end, err = parseFlag(arg[:1], rest, mustUse)
if err != nil {
return
}
Expand Down
2 changes: 1 addition & 1 deletion commands/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (c *Command) Resolve(pth []string) ([]*Command, error) {
cmd = cmd.Subcommand(name)

if cmd == nil {
pathS := path.Join(pth[0:i])
pathS := path.Join(pth[:i])
return nil, fmt.Errorf("Undefined command: '%s'", pathS)
}

Expand Down
4 changes: 2 additions & 2 deletions p2p/crypto/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ func KeyStretcher(cipherType string, hashType string, secret []byte) (StretchedK
var k1 StretchedKeys
var k2 StretchedKeys

k1.IV = r1[0:ivSize]
k1.IV = r1[:ivSize]
k1.CipherKey = r1[ivSize : ivSize+cipherKeySize]
k1.MacKey = r1[ivSize+cipherKeySize:]

k2.IV = r2[0:ivSize]
k2.IV = r2[:ivSize]
k2.CipherKey = r2[ivSize : ivSize+cipherKeySize]
k2.MacKey = r2[ivSize+cipherKeySize:]

Expand Down
4 changes: 2 additions & 2 deletions p2p/peer/addr/addrsrcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func addrSourcesSame(a, b Source) bool {

func TestAddrCombine(t *testing.T) {
addrs := newAddrs(t, 30)
a := Slice(addrs[0:10])
a := Slice(addrs[:10])
b := Slice(addrs[10:20])
c := Slice(addrs[20:30])
d := CombineSources(a, b, c)
Expand All @@ -58,7 +58,7 @@ func TestAddrCombine(t *testing.T) {
func TestAddrUnique(t *testing.T) {

addrs := newAddrs(t, 40)
a := Slice(addrs[0:20])
a := Slice(addrs[:20])
b := Slice(addrs[10:30])
c := Slice(addrs[20:40])
d := CombineSources(a, b, c)
Expand Down

0 comments on commit 2ffef14

Please sign in to comment.