mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
carddav: pass pointer in CreateAddressBook
The struct is a bit too large to pass by value.
This commit is contained in:
parent
f1d56f2437
commit
fbcd08d64a
@ -68,7 +68,7 @@ func (b *testBackend) GetAddressBook(ctx context.Context, path string) (*Address
|
||||
return nil, webdav.NewHTTPError(404, fmt.Errorf("Not found"))
|
||||
}
|
||||
|
||||
func (*testBackend) CreateAddressBook(ctx context.Context, ab AddressBook) error {
|
||||
func (*testBackend) CreateAddressBook(ctx context.Context, ab *AddressBook) error {
|
||||
panic("TODO: implement")
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ type Backend interface {
|
||||
AddressBookHomeSetPath(ctx context.Context) (string, error)
|
||||
ListAddressBooks(ctx context.Context) ([]AddressBook, error)
|
||||
GetAddressBook(ctx context.Context, path string) (*AddressBook, error)
|
||||
CreateAddressBook(ctx context.Context, addressBook AddressBook) error
|
||||
CreateAddressBook(ctx context.Context, addressBook *AddressBook) error
|
||||
DeleteAddressBook(ctx context.Context, path string) error
|
||||
GetAddressObject(ctx context.Context, path string, req *AddressDataRequest) (*AddressObject, error)
|
||||
ListAddressObjects(ctx context.Context, path string, req *AddressDataRequest) ([]AddressObject, error)
|
||||
@ -716,7 +716,7 @@ func (b *backend) Mkcol(r *http.Request) error {
|
||||
// TODO ...
|
||||
}
|
||||
|
||||
return b.Backend.CreateAddressBook(r.Context(), ab)
|
||||
return b.Backend.CreateAddressBook(r.Context(), &ab)
|
||||
}
|
||||
|
||||
func (b *backend) Copy(r *http.Request, dest *internal.Href, recursive, overwrite bool) (created bool, err error) {
|
||||
|
Loading…
Reference in New Issue
Block a user