From 8cadc751ca6cccbf2b8edbab6b11c01b347418eb Mon Sep 17 00:00:00 2001 From: Dmitri Nikulin Date: Thu, 23 Apr 2020 12:43:43 -0600 Subject: Add //go:generate stringer directives for public enum types. All such directives can be invoked by running $ go generate Stringer itself can be obtained by running $ go get golang.org/x/tools/cmd/stringer See https://github.com/osrg/gobgp/issues/2265 --- pkg/packet/bgp/bgp.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/packet/bgp/bgp.go') diff --git a/pkg/packet/bgp/bgp.go b/pkg/packet/bgp/bgp.go index f72a3706..2790c080 100644 --- a/pkg/packet/bgp/bgp.go +++ b/pkg/packet/bgp/bgp.go @@ -2102,6 +2102,7 @@ func NewRouteTargetMembershipNLRI(as uint32, target ExtendedCommunityInterface) } } +//go:generate stringer -type=ESIType type ESIType uint8 const ( @@ -8284,6 +8285,7 @@ func (f BGPAttrFlag) String() string { return strings.Join(strs, "|") } +//go:generate stringer -type=BGPAttrType type BGPAttrType uint8 const ( -- cgit v1.2.3