uses log instead of fmt

This commit is contained in:
Christoph Polcin 2022-10-15 14:44:49 +02:00
parent 8190232c06
commit 4adca27344
2 changed files with 2 additions and 7 deletions

View File

@ -2,8 +2,8 @@ package gowebdav
import ( import (
"bytes" "bytes"
"fmt"
"io" "io"
"log"
"net/http" "net/http"
"path" "path"
"strings" "strings"
@ -181,7 +181,7 @@ func (c *Client) copymove(method string, oldpath string, newpath string, overwri
case 207: case 207:
// TODO handle multistat errors, worst case ... // TODO handle multistat errors, worst case ...
log(fmt.Sprintf(" TODO handle %s - %s multistatus result %s", method, oldpath, String(data))) log.Printf("TODO handle %s - %s multistatus result %s\n", method, oldpath, String(data))
case 409: case 409:
err := c.createParentCollection(newpath) err := c.createParentCollection(newpath)

View File

@ -3,7 +3,6 @@ package gowebdav
import ( import (
"bytes" "bytes"
"encoding/xml" "encoding/xml"
"fmt"
"io" "io"
"net/url" "net/url"
"strconv" "strconv"
@ -11,10 +10,6 @@ import (
"time" "time"
) )
func log(msg interface{}) {
fmt.Println(msg)
}
// PathEscape escapes all segments of a given path // PathEscape escapes all segments of a given path
func PathEscape(path string) string { func PathEscape(path string) string {
s := strings.Split(path, "/") s := strings.Split(path, "/")