2015-02-01 13:57:57 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2016-07-11 20:02:01 +00:00
|
|
|
"github.com/tus/tusd/cmd/tusd/cli"
|
2015-02-01 13:57:57 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2016-07-11 20:02:01 +00:00
|
|
|
cli.ParseFlags()
|
|
|
|
cli.PrepareGreeting()
|
2016-05-24 15:04:28 +00:00
|
|
|
|
2016-07-11 20:02:01 +00:00
|
|
|
// Print version and other information and exit if the -version flag has been
|
|
|
|
// passed else we will start the HTTP server
|
|
|
|
if cli.Flags.ShowVersion {
|
|
|
|
cli.ShowVersion()
|
2016-05-10 12:17:34 +00:00
|
|
|
} else {
|
2016-07-11 20:02:01 +00:00
|
|
|
cli.CreateComposer()
|
|
|
|
cli.Serve()
|
2015-02-01 13:57:57 +00:00
|
|
|
}
|
|
|
|
}
|