Browse Source

更改.git忽略

master
xyiege 3 months ago
parent
commit
aeec72c1dd
  1. 9
      .gitignore
  2. 11
      aufs/main.go

9
.gitignore

@ -34,4 +34,11 @@ build/
logs/ logs/
files/ files/
vue/fsvue/ vue/fsvue/
vue/afvue/node_modules
.DS_Store
vue/afvue/dist
dist-ssr
*.local
aufs/www/

11
aufs/main.go

@ -12,7 +12,7 @@ import (
// 启动web服务 // 启动web服务
func startWeb() { func startWeb() {
//创建一个文件服务器,会去www目录下找index.html //创建一个文件服务器,会去www目录下找index.html
fileServer := http.FileServer(http.Dir("./fsw")) fileServer := http.FileServer(http.Dir("./www"))
// 将 "/" 路径映射到文件服务器 // 将 "/" 路径映射到文件服务器
http.Handle("/", fileServer) http.Handle("/", fileServer)
//扫描指定的目录 //扫描指定的目录
@ -61,8 +61,8 @@ func main() {
if args == nil || len(args) < 2 { if args == nil || len(args) < 2 {
// 编程客户端 // 编程客户端
fmt.Printf("run as client\n") fmt.Printf("run as client\n")
startWeb()
fmt.Printf("Usage: ./fss -t /home/\n") // 提示
os.Exit(1) os.Exit(1)
} }
config.G.LocalIP = lcip config.G.LocalIP = lcip
@ -81,6 +81,11 @@ func main() {
// current work directory // current work directory
config.G.FilePath = curdir config.G.FilePath = curdir
} }
// 使用帮助
if flag == "-h" {
fmt.Printf("Usage: ./fss -t /home/\n")
os.Exit(1)
}
// args 长度大于4 才有意思 // args 长度大于4 才有意思
if len(args) > 4 { if len(args) > 4 {

Loading…
Cancel
Save