2
0
mirror of https://github.com/status-im/consul.git synced 2025-01-27 05:57:03 +00:00
2017-09-05 22:57:29 -07:00

13 lines
294 B
Go

package metadata
import (
"github.com/hashicorp/go-version"
"github.com/hashicorp/serf/serf"
)
// Build extracts the Consul version info for a member.
func Build(m *serf.Member) (*version.Version, error) {
str := versionFormat.FindString(m.Tags["build"])
return version.NewVersion(str)
}