Read to do some little change of webdav in golang.org/x/net
This commit is contained in:
@ -166,7 +166,7 @@ var liveProps = map[xml.Name]struct {
|
||||
//
|
||||
// Each Propstat has a unique status and each property name will only be part
|
||||
// of one Propstat element.
|
||||
func Props(ctx context.Context, fs FileSystem, ls LockSystem, name string, pnames []xml.Name) ([]Propstat, error) {
|
||||
func props(ctx context.Context, fs FileSystem, ls LockSystem, name string, pnames []xml.Name) ([]Propstat, error) {
|
||||
f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -214,7 +214,7 @@ func Props(ctx context.Context, fs FileSystem, ls LockSystem, name string, pname
|
||||
}
|
||||
|
||||
// Propnames returns the property names defined for resource name.
|
||||
func Propnames(ctx context.Context, fs FileSystem, ls LockSystem, name string) ([]xml.Name, error) {
|
||||
func propnames(ctx context.Context, fs FileSystem, ls LockSystem, name string) ([]xml.Name, error) {
|
||||
f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -254,8 +254,8 @@ func Propnames(ctx context.Context, fs FileSystem, ls LockSystem, name string) (
|
||||
// returned if they are named in 'include'.
|
||||
//
|
||||
// See http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND
|
||||
func Allprop(ctx context.Context, fs FileSystem, ls LockSystem, name string, include []xml.Name) ([]Propstat, error) {
|
||||
pnames, err := Propnames(ctx, fs, ls, name)
|
||||
func allprop(ctx context.Context, fs FileSystem, ls LockSystem, name string, include []xml.Name) ([]Propstat, error) {
|
||||
pnames, err := propnames(ctx, fs, ls, name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -269,7 +269,7 @@ func Allprop(ctx context.Context, fs FileSystem, ls LockSystem, name string, inc
|
||||
pnames = append(pnames, pn)
|
||||
}
|
||||
}
|
||||
return Props(ctx, fs, ls, name, pnames)
|
||||
return props(ctx, fs, ls, name, pnames)
|
||||
}
|
||||
|
||||
// Patch patches the properties of resource name. The return values are
|
||||
|
Reference in New Issue
Block a user