1
0
Fork 0
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:
Aleksa Sarai 2017-02-16 03:10:30 +11:00
parent 91d7ec8c89
commit c5ec1c9f3a
No known key found for this signature in database
GPG key ID: 9E18AA267DDB8DB4
21 changed files with 26 additions and 1252 deletions

View file

@ -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
}