aceberg/miniboard

View on GitHub
internal/check/in-slice.go

Summary

Maintainability
A
0 mins
Test Coverage
package check

// InSlice - check if element is in slice
func InSlice(slice []string, elem string) bool {

    for _, str := range slice {

        if str == elem {
            return true
        }
    }

    return false
}