reflection goes out of the window

This commit is contained in:
2019-11-10 01:24:45 +03:00
parent bc00262ead
commit f442dc6921
16 changed files with 87 additions and 63 deletions

View File

@ -2,8 +2,6 @@ package ecs
// ECS system by jcerise, github.com/jcerise/gogue
import "reflect"
// IntInSlice will return true if the integer value provided is present in the slice provided, false otherwise.
func IntInSlice(a int, list []int) bool {
for _, b := range list {
@ -15,7 +13,7 @@ func IntInSlice(a int, list []int) bool {
}
// TypeInSlice will return true if the reflect.Type provided is present in the slice provided, false otherwise.
func TypeInSlice(a reflect.Type, list []reflect.Type) bool {
func TypeInSlice(a string, list []string) bool {
for _, b := range list {
if b == a {
return true