mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-01 05:28:30 +00:00
*: switch everything to govis
Now that we have govis, move everything to using govis.{Vis,Unvis} and then remove the cvis build tags (because that code no longer exists). Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
parent
91d7ec8c89
commit
c5ec1c9f3a
21 changed files with 26 additions and 1252 deletions
6
entry.go
6
entry.go
|
@ -4,6 +4,8 @@ import (
|
|||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/vbatts/go-mtree/pkg/govis"
|
||||
)
|
||||
|
||||
type byPos []Entry
|
||||
|
@ -47,7 +49,7 @@ func (e Entry) Descend(filename string) *Entry {
|
|||
func (e Entry) Find(filepath string) *Entry {
|
||||
resultnode := &e
|
||||
for _, path := range strings.Split(filepath, "/") {
|
||||
encoded, err := Vis(path, DefaultVisFlags)
|
||||
encoded, err := govis.Vis(path, DefaultVisFlags)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
@ -68,7 +70,7 @@ func (e Entry) Ascend() *Entry {
|
|||
// Path provides the full path of the file, despite RelativeType or FullType. It
|
||||
// will be in Unvis'd form.
|
||||
func (e Entry) Path() (string, error) {
|
||||
decodedName, err := Unvis(e.Name)
|
||||
decodedName, err := govis.Unvis(e.Name, DefaultVisFlags)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue