cosmos-sdk/x/ibc/24-host/utils.go
Federico Kunze 4aa078b5f3
x/ibc ICS24 (#5588)
* 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>
2020-02-19 10:56:22 +01:00

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
}