dd0e8eec14
* copyright headers for agent folder * Ignore test data files * fix proto files and remove headers in agent/uiserver folder * ignore deep-copy files
16 lines
364 B
Go
16 lines
364 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
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)
|
|
}
|