gowebdav

Webdav Server in Go


I want to implement a webdav-server with Go and found a new "x" package here:

But I don't know how to use this package to get it done. Can someone help me with this issue?

I tried this:

func main(){
    fs := new(webdav.FileSystem)
    ls := new(webdav.LockSystem)
    h := new(webdav.Handler)
    h.FileSystem = *fs
    h.LockSystem = *ls
    //then use the Handler.ServeHTTP Method as the http.HandleFunc
    http.HandleFunc("/", h.ServeHTTP)
    http.ListenAndServe(":5555", nil)
}

If I try to connect to the server, I get an internal server error.

What am I doing wrong?

Thanks for your help.


Solution

  • The x/net/webdav is still in early phase of development. Many critical parts are still being implemented, and it can not be used as such at this moment. Taking a look at the source code over half of the necessary structures and functions are still completely missing.

    Unfortunately there are no Go based webdav server implementations at this moment. (In case someone can correct me, please feel free to do so!)