This commit is contained in:
crusader 2018-04-19 17:44:08 +09:00
parent 9b7b98602b
commit 2eacff61a0
2 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,10 @@ var (
} }
) )
func ToCryptoType(v string) CryptoType {
return cryptoTypeName[v]
}
func (ct CryptoType) String() string { func (ct CryptoType) String() string {
return cryptoTypeID[ct] return cryptoTypeID[ct]
} }

View File

@ -24,6 +24,10 @@ var (
} }
) )
func ToPortType(v string) PortType {
return portTypeName[v]
}
func (pt PortType) String() string { func (pt PortType) String() string {
return portTypeID[pt] return portTypeID[pt]
} }