http - http.Dir 的文档在哪里
问题描述
我正在尝试设置一个 go 文件服务器,并在http.Dir(path string) http.FileSystem
查看 FileSystem 的文档时遇到了该功能。
在 net/http/fs.go 第 705 行的源代码中,它说:
//To use the operating system's file system implementation,
//
// use http.Dir:
//
// http.Handle("/", http.FileServer(http.Dir("/tmp")))
但我找不到这个函数的任何文档。我错过了什么吗?
编辑:我错过了它是一种类型
解决方案
推荐阅读
- python - 按照 MVC 模式创建一个 Django 项目?
- c# - 在c#中合并datagridview中的列
- python - 如何在一些想要的字母之后提取字符串?仅使用 python 2.0 和 numpy 和 pandas
- elasticsearch - 在kibana汇总作业中获取给定间隔的连续时间戳
- jquery - select2 占位符显示组文本和子项
- json - 如何使用 Java 在 Google 电子表格中创建复选框
- c# - 如何正则表达式。仅替换我捕获的组?
- flutter - 在 Flutter 项目中为 iOS 导出存档时 Codemagic 或 Fastlane 失败
- node.js - 为什么我无法将变量从一个文件导出到另一个文件
- java - javax.net.ssl.SSLHandshakeException:收到致命警报:非法参数