* x/ibc ICS24 * changelog * move regex to /types * address @alexanderbez comments Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com> Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
12 lines
265 B
Go
12 lines
265 B
Go
package host
|
|
|
|
// RemovePath is an util function to remove a path from a set.
|
|
func RemovePath(paths []string, path string) ([]string, bool) {
|
|
for i, p := range paths {
|
|
if p == path {
|
|
return append(paths[:i], paths[i+1:]...), true
|
|
}
|
|
}
|
|
return paths, false
|
|
}
|