summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSergey Elantsev <elantsev.s@yandex.ru>2020-03-15 23:45:50 +0300
committerSergey Elantsev <elantsev.s@yandex.ru>2020-03-15 23:45:50 +0300
commita5f98d5dd530602a76af64afadd246f840fcca97 (patch)
treebfe5910bb03fdce4c3bd45604a8a747b14c0171d
parentff36bb98781c92fd8ec20c9a89c0c5a4f63b05da (diff)
replaced fmt.Sprintf with strconv.Itoa for Protocol.String()
-rw-r--r--pkg/packet/bgp/constant.go3
1 files changed, 1 insertions, 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
}