1 // Copyright 2019 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.
11 func packageMainIsDevelModule() bool {
12 info, ok := debug.ReadBuildInfo()
14 // Most test binaries currently lack build info, but this should become more
15 // permissive once https://golang.org/issue/33976 is fixed.
19 // Note: info.Main.Version describes the version of the module containing
20 // package main, not the version of “the main module”.
21 // See https://golang.org/issue/33975.
22 return info.Main.Version == "(devel)"
26 packageMainIsDevel = packageMainIsDevelModule