delve/pkg/version/version.go
Alessandro Arzilli 7548542795
all: bump version and release notes (#2331)
Thank you to: @andreimatei, @hitzhangjie, @dlsniper, @nd, @polinasok,
@oxisto, @zamai, @artspb.
2021-01-28 13:42:42 -08:00

29 lines
557 B
Go

package version
import "fmt"
// Version represents the current version of Delve.
type Version struct {
Major string
Minor string
Patch string
Metadata string
Build string
}
var (
// DelveVersion is the current version of Delve.
DelveVersion = Version{
Major: "1", Minor: "6", Patch: "0", Metadata: "",
Build: "$Id$",
}
)
func (v Version) String() string {
ver := fmt.Sprintf("Version: %s.%s.%s", v.Major, v.Minor, v.Patch)
if v.Metadata != "" {
ver += "-" + v.Metadata
}
return fmt.Sprintf("%s\nBuild: %s", ver, v.Build)
}