From 2eacff61a09ac695cea49e020736b1ed16cc6d2c Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 19 Apr 2018 17:44:08 +0900 Subject: [PATCH] ing --- core/constants/network-crypto.go | 4 ++++ core/constants/network-port.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/core/constants/network-crypto.go b/core/constants/network-crypto.go index 5a140d2..fe54cf2 100644 --- a/core/constants/network-crypto.go +++ b/core/constants/network-crypto.go @@ -21,6 +21,10 @@ var ( } ) +func ToCryptoType(v string) CryptoType { + return cryptoTypeName[v] +} + func (ct CryptoType) String() string { return cryptoTypeID[ct] } diff --git a/core/constants/network-port.go b/core/constants/network-port.go index b0f5355..e4c6bad 100644 --- a/core/constants/network-port.go +++ b/core/constants/network-port.go @@ -24,6 +24,10 @@ var ( } ) +func ToPortType(v string) PortType { + return portTypeName[v] +} + func (pt PortType) String() string { return portTypeID[pt] }