2017-10-20 15:08:25 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2017-11-30 21:28:18 +00:00
|
|
|
"flag"
|
|
|
|
|
2017-12-15 19:25:02 +00:00
|
|
|
"log"
|
|
|
|
"sync"
|
|
|
|
|
2017-11-08 13:11:37 +00:00
|
|
|
"github.com/metonimie/simpleFTP/server/server"
|
2017-10-20 15:08:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2017-11-30 21:28:18 +00:00
|
|
|
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
|
|
|
}
|