mirror of
https://github.com/beego/bee.git
synced 2024-11-01 05:00:55 +00:00
26 lines
535 B
Go
26 lines
535 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: "0", Minor: "12", Patch: "1", Metadata: ""}
|
|
)
|
|
|
|
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)
|
|
}
|