func main() { flag.Parse() switch { case *start: fmt.Fprintln(os.Stdout, "Starting vafan...") vafan.StartServer() os.Exit(0) case *makeUserAdmin != "": fmt.Fprintln(os.Stdout, "Making user admin...") vafan.MakeUserAdmin(*makeUserAdmin) os.Exit(0) case *getVideoDetails != "": fmt.Fprintln(os.Stdout, "Getting video details...") v, _ := vafan.GetVideoByName(*getVideoDetails) v.UpdateExternalData() os.Exit(0) case *javascriptFiles: j := vafan.GetJavascriptFileList() fmt.Fprintln(os.Stdout, j) os.Exit(0) case *cssFiles != "": c := vafan.GetCSSFileList(*cssFiles) fmt.Fprintln(os.Stdout, c) os.Exit(0) case *printTweets: //vafan.PrintTweets() os.Exit(0) } fmt.Fprintln(os.Stdout, "No command. Quitting...") os.Exit(1) }
func main() { vafan.StartServer() os.Exit(0) }