2016-02-19 18:32:24 +00:00
|
|
|
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.
|
2017-04-28 17:14:33 +00:00
|
|
|
DelveVersion = Version{
|
all: Bump to v1.1.0
Add new version to CHANGELOG and update internal version.
Thank you @jaym, @slp, @yasushi-saito, @acshekhara1, @benc153,
@yuval-k, @functionary, @psanford @giuscri, @jsoref, @Carpetsmoker,
@PatrickSchuster, @aarzilli, @derekparker, @ramya-rao-a and @dlsniper.
2018-08-15 16:37:07 +00:00
|
|
|
Major: "1", Minor: "1", Patch: "0", Metadata: "",
|
2017-04-28 17:14:33 +00:00
|
|
|
Build: "$Id$",
|
|
|
|
}
|
2016-02-19 18:32:24 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (v Version) String() string {
|
2017-01-11 19:34:54 +00:00
|
|
|
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)
|
2016-02-19 18:32:24 +00:00
|
|
|
}
|