Skip to content

dl/gotip: gotip panics without arguments #39099

@dvrkps

Description

@dvrkps

What version of Go are you using (go version)?

$ go version devel +2b70ffe Fri May 15 16:15:25 2020 +0000 darwin/amd64

Does this issue reproduce with the latest release?

Sure

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/davor/Library/Caches/go-build"
GOENV="/Users/davor/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOOS="darwin"
GOPATH="/Users/davor/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/davor/goproject/dl/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/9h/yvy5nvq917n_xcbth_j21kkh0000gn/T/go-build689897483=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

a type gotip without any arguments

What did you expect to see?

Standard go command help message.

What did you see instead?

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.main()
	/Users/davor/go/pkg/mod/golang.org/dl@v0.0.0-20200514221906-2a7874809c5f/gotip/main.go:40 +0xa65

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions