1
0
mirror of https://github.com/beego/bee.git synced 2024-11-15 13:40:54 +00:00
bee/vendor/github.com/go-delve/delve/pkg/version/version.go

29 lines
600 B
Go
Raw Normal View History

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.
2018-10-13 13:45:53 +00:00
DelveVersion = Version{
2019-04-15 14:43:01 +00:00
Major: "1", Minor: "2", Patch: "0", Metadata: "",
Build: "$Id: 068e2451004e95d0b042e5257e34f0f08ce01466 $",
2018-10-13 13:45:53 +00:00
}
)
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)
}