Go中的Webdav服务器 [英] Webdav Server in Go

查看:145
本文介绍了Go中的Webdav服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Go实现一个webdav服务器,并在此处找到一个新的"x"包:

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?

我尝试过:

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.

我在做什么错了?

感谢您的帮助.

推荐答案

x/net/webdav仍处于开发的早期阶段.许多关键部分仍在实施中,目前无法使用.查看源代码,仍然有一半以上的必要结构和功能完全消失了.

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.

不幸的是,目前没有基于Go的webdav服务器实现.(如果有人可以纠正我,请随时这样做!)

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

这篇关于Go中的Webdav服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆