Files
obitools4/pkg/obiutils/path.go
Eric Coissac a33e471b39 First attempt for obiconsensus... The graph traversing algorithm is too simple
Former-commit-id: 0456e6c7fd55d6d0fcf9856c40386b976b912cba
2023-03-27 19:51:10 +07:00

16 lines
205 B
Go

package obiutils
import (
"path"
"strings"
)
func RemoveAllExt(p string) string {
for ext := path.Ext(p); len(ext) > 0; ext = path.Ext(p) {
p = strings.TrimSuffix(p, ext)
}
return p
}