github.com/dnutiu/simplFT@v0.0.0-20181023061248-df4b14cdce57/main.go (about)

     1  package main
     2  
     3  import (
     4  	"flag"
     5  
     6  	"log"
     7  	"sync"
     8  
     9  	"github.com/dnutiu/simplFT/server"
    10  )
    11  
    12  func main() {
    13  	flag.StringVar(&server.ConfigName, "config-name", "config",
    14  		"Set the name of the config file.")
    15  	flag.StringVar(&server.ConfigPath, "config", ".", "Set the location of the config file.")
    16  	flag.Parse()
    17  
    18  	var wg = new(sync.WaitGroup)
    19  
    20  	server.Init()
    21  
    22  	wg.Add(2)
    23  	go server.StartUploadServer(wg)
    24  	go server.StartFtpServer(wg)
    25  	wg.Wait()
    26  
    27  	log.Println("bye")
    28  }