Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(73)

Issue 4982041: code review 4982041: godoc: fix bug in zip.go (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by gri
Modified:
13 years, 11 months ago
Reviewers:
rsc
CC:
dsymonds, golang-dev
Visibility:
Public.

Description

godoc: fix bug in zip.go The result of sort.Search is in the interval [0,n); specifically, if no entry is found, the result is n and not -1.

Patch Set 1 #

Patch Set 2 : diff -r db63f3a1f992 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M src/cmd/godoc/zip.go View 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 4
gri
Hello dsymonds (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 11 months ago (2011-08-29 23:39:27 UTC) #1
dsymonds
LGTM Seems like we should change sort.Search, though. It's an outlier when compared to, for ...
13 years, 11 months ago (2011-08-29 23:47:25 UTC) #2
gri
*** Submitted as http://code.google.com/p/go/source/detail?r=f82589a5e747 *** godoc: fix bug in zip.go The result of sort.Search is ...
13 years, 11 months ago (2011-08-29 23:49:35 UTC) #3
rsc
13 years, 11 months ago (2011-08-29 23:52:16 UTC) #4
On Mon, Aug 29, 2011 at 19:47, David Symonds <dsymonds@golang.org> wrote:
> Seems like we should change sort.Search, though. It's an outlier when
> compared to, for instance, strings.Index.

sort.Search is different from strings.Index.
It tells you where the element would be
if it were in the array.  No element would
ever be at index -1.

Russ
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b