arnaucube
arnaucube/argosPublic Self-hosted repository
argos/main.go
main.goRaw
 1package main
 2
 3import (
 4	"bufio"
 5	"fmt"
 6	"os"
 7	"strings"
 8)
 9
10func main() {
11	fmt.Println("---------------")
12	fmt.Println("goTweetsAnalyze initialized")
13	fmt.Println("Reading twitterConfig.json file")
14	client := readConfigTokensAndConnect()
15
16	fmt.Println("---------------")
17	newcommand := bufio.NewReader(os.Stdin)
18	fmt.Print("Please select command number:")
19	options := `
20	1 - Analyze username
21	0 - Exit script
22option to select: `
23	for {
24		fmt.Print(options)
25		option, _ := newcommand.ReadString('\n')
26		option = strings.TrimSpace(option)
27
28		switch option {
29		case "1":
30			fmt.Println("selected 1 - Analyze username")
31			analyzeUsername(client)
32			break
33		case "2":
34			fmt.Println("selected 2 - Delete all Favs")
35			break
36		case "3":
37			fmt.Println("selected 3 - Delete all Tweets and Favs")
38			break
39		case "0":
40			fmt.Println("selected 0 - exit script")
41			os.Exit(3)
42			break
43		default:
44			fmt.Println("Invalid option")
45			break
46		}
47	}
48}