From 7144ce25179e1f73f28ecebd6655807f92a87961 Mon Sep 17 00:00:00 2001 From: Tao Wang Date: Fri, 9 Mar 2018 00:07:47 +1100 Subject: [PATCH] Fix issue 1742 by replacing '>' with '>=' Signed-off-by: Tao Wang --- gps/pkgtree/pkgtree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gps/pkgtree/pkgtree.go b/gps/pkgtree/pkgtree.go index 7d0ab4c3c7..9ca16bbadd 100644 --- a/gps/pkgtree/pkgtree.go +++ b/gps/pkgtree/pkgtree.go @@ -349,7 +349,7 @@ func findImportComment(pkgName *ast.Ident, c *ast.CommentGroup) string { return "" } text = text[:end] - if bytes.IndexByte(text, '\n') > 0 { + if bytes.IndexByte(text, '\n') >= 0 { // multiline comment, can't be an import comment return "" }