simplFT/main.go

29 lines
461 B
Go
Raw Permalink Normal View History

2017-10-20 15:08:25 +00:00
package main
import (
"flag"
2017-12-15 19:25:02 +00:00
"log"
"sync"
"github.com/dnutiu/simplFT/server"
2017-10-20 15:08:25 +00:00
)
func main() {
flag.StringVar(&server.ConfigName, "config-name", "config",
"Set the name of the config file.")
flag.StringVar(&server.ConfigPath, "config", ".", "Set the location of the config file.")
flag.Parse()
2017-12-15 19:25:02 +00:00
var wg = new(sync.WaitGroup)
2017-11-26 21:03:15 +00:00
server.Init()
2017-12-15 19:25:02 +00:00
wg.Add(2)
go server.StartUploadServer(wg)
go server.StartFtpServer(wg)
wg.Wait()
log.Println("bye")
2017-10-20 15:08:25 +00:00
}