Adjust + Test
This commit is contained in:
@@ -147,6 +147,15 @@ var Str = [...]string{
|
||||
"native_tool",
|
||||
}
|
||||
|
||||
func FromString(comp string) int {
|
||||
for i, str := range Str {
|
||||
if str == comp {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func FromInt(i int) string {
|
||||
return Str[i]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user