d39131d154
* wrap errors, whitespace * remove named return * reverse CheckSuffix logic, rename function * drop redundant if/else, happy path * log.Fatal -> fmt.Errorf * simplify GetItemMap, AddItem * var -> const * removed short-lived vars * de-duplicate function and reverse logic
11 lines
203 B
Go
11 lines
203 B
Go
package cwhub
|
|
|
|
import (
|
|
"path/filepath"
|
|
"strings"
|
|
)
|
|
|
|
func hasPathSuffix(hubpath string, remotePath string) bool {
|
|
newPath := filepath.ToSlash(hubpath)
|
|
return strings.HasSuffix(newPath, remotePath)
|
|
}
|