示例#1
0
func main() {
	s := server.Server{
		Port:       3000,
		ConfigPath: "cloud-torrent.json",
	}

	opts.New(&s).
		Version(VERSION).
		PkgRepo().
		Parse()

	if err := s.Run(VERSION); err != nil {
		log.Fatal(err)
	}
}
示例#2
0
func main() {
	s := server.Server{
		Title:      "Cloud Torrent",
		Port:       3000,
		ConfigPath: "cloud-torrent.json",
	}

	o := opts.New(&s)
	o.Version(VERSION)
	o.PkgRepo()
	o.LineWidth = 96
	o.Parse()

	if err := s.Run(VERSION); err != nil {
		log.Fatal(err)
	}
}