First attempt for obiconsensus... The graph traversing algorithm is too simple

Former-commit-id: 0456e6c7fd55d6d0fcf9856c40386b976b912cba
This commit is contained in:
2023-03-27 19:51:10 +07:00
parent d5e84ec676
commit a33e471b39
17 changed files with 868 additions and 23 deletions

16
pkg/obiutils/path.go Normal file
View File

@ -0,0 +1,16 @@
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
}