summaryrefslogtreecommitdiffhomepage
path: root/cmd/gobgpd/main.go
diff options
context:
space:
mode:
authorEmil Palm <emil@netnod.se>2019-05-10 15:11:22 +0200
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-06-03 21:25:01 +0900
commit671dc0d94ab92e2b21e4643ce930efb0df4ccc6d (patch)
tree677f3ff7a9df2bbe3468dfd5d0397c87ce11ef9e /cmd/gobgpd/main.go
parent3e3289448b48fbdf9cc765450bd421e3a71323b5 (diff)
Add Versioning support
Diffstat (limited to 'cmd/gobgpd/main.go')
-rw-r--r--cmd/gobgpd/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/gobgpd/main.go b/cmd/gobgpd/main.go
index 015b0a4b..7ad06434 100644
--- a/cmd/gobgpd/main.go
+++ b/cmd/gobgpd/main.go
@@ -39,12 +39,11 @@ import (
"github.com/osrg/gobgp/internal/pkg/apiutil"
"github.com/osrg/gobgp/internal/pkg/config"
"github.com/osrg/gobgp/internal/pkg/table"
+ "github.com/osrg/gobgp/internal/pkg/version"
"github.com/osrg/gobgp/pkg/packet/bgp"
"github.com/osrg/gobgp/pkg/server"
)
-var version = "master"
-
func marshalRouteTargets(l []string) ([]*any.Any, error) {
rtList := make([]*any.Any, 0, len(l))
for _, rtString := range l {
@@ -132,7 +131,7 @@ func main() {
}
if opts.Version {
- fmt.Println("gobgpd version", version)
+ fmt.Println("gobgpd version", version.Version())
os.Exit(0)
}