1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // Package version implements the ``go version'' command.
12 "cmd/go/internal/base"
15 var CmdVersion
= &base
.Command
{
17 UsageLine
: "go version",
18 Short
: "print Go version",
19 Long
: `Version prints the Go version, as reported by runtime.Version.`,
22 func runVersion(cmd
*base
.Command
, args
[]string) {
27 fmt
.Printf("go version %s %s/%s\n", runtime
.Version(), runtime
.GOOS
, runtime
.GOARCH
)