tools/cmd/go-contrib-init
Austin Clements 7a4327eb7a cmd/go-contrib-init: don't crash from src/golang.org/x
If go-contrib-init is executed from the src/golang.org/x directory (as
opposed to a sub-directory), it crashes with an index out-of-bounds.

Fix this by including the trailing slash in the inspected path prefix
so we never slice more than what we know is in the string.

Change-Id: Ibbb74759c2ba839972de34a8ffb28b6cfb6825e2
Reviewed-on: https://go-review.googlesource.com/48690
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-15 16:38:41 +00:00
..
contrib.go cmd/go-contrib-init: don't crash from src/golang.org/x 2017-07-15 16:38:41 +00:00
contrib_test.go tools: handle paths like ~/ or $HOME/. 2017-06-22 02:08:34 +00:00