From a5f98d5dd530602a76af64afadd246f840fcca97 Mon Sep 17 00:00:00 2001 From: Sergey Elantsev Date: Sun, 15 Mar 2020 23:45:50 +0300 Subject: replaced fmt.Sprintf with strconv.Itoa for Protocol.String() --- pkg/packet/bgp/constant.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/packet/bgp/constant.go b/pkg/packet/bgp/constant.go index f05ee4f2..6f87efdd 100644 --- a/pkg/packet/bgp/constant.go +++ b/pkg/packet/bgp/constant.go @@ -16,7 +16,6 @@ package bgp import ( - "fmt" "strconv" "strings" ) @@ -74,7 +73,7 @@ var ProtocolNameMap = map[Protocol]string{ func (p Protocol) String() string { name, ok := ProtocolNameMap[p] if !ok { - return fmt.Sprintf("%d", p) + return strconv.Itoa(int(p)) } return name } -- cgit v1.2.3