Remove unused methods in version.go (#8144)

This commit is contained in:
Andrew Ashikhmin 2023-09-06 11:02:04 +02:00 committed by GitHub
parent d60940d7db
commit ba1e4679fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,21 +39,6 @@ const (
VersionKeyFinished = "ErigonVersionFinished"
)
func withModifier(vsn string) string {
if !isStable() {
vsn += "-" + VersionModifier
}
return vsn
}
func isStable() bool {
return VersionModifier == "stable"
}
func isRelease() bool {
return isStable() || VersionModifier == "alpha" || VersionModifier == "beta"
}
// Version holds the textual version string.
var Version = func() string {
return fmt.Sprintf("%d.%02d.%d", VersionMajor, VersionMinor, VersionMicro)
@ -68,18 +53,6 @@ var VersionWithMeta = func() string {
return v
}()
// ArchiveVersion holds the textual version string used for Geth archives.
// e.g. "1.8.11-dea1ce05" for stable releases, or
//
// "1.8.13-unstable-21c059b6" for unstable releases
func ArchiveVersion(gitCommit string) string {
vsn := withModifier(Version)
if len(gitCommit) >= 8 {
vsn += "-" + gitCommit[:8]
}
return vsn
}
func VersionWithCommit(gitCommit string) string {
vsn := VersionWithMeta
if len(gitCommit) >= 8 {