-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
55 lines (51 loc) · 1.22 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package main
import (
"github.com/odair-pedro/gourl/fetch"
"github.com/odair-pedro/gourl/logging"
)
var logger = logging.GetLoggerInstance()
func main() {
_ = fetch.NewRequestParams("test", 1)
logger.Info("I'm alive :)")
}
//
//import (
// "./fetch"
// "./logging"
// "./slice"
// "encoding/json"
// "fmt"
// "github.com/sirupsen/logrus"
// "os"
//)
//
//func main() {
// if hasHelpArg() {
// printHelp()
// }
// logger := logging.GetInstance()
// logger.SetLevel(logrus.DebugLevel)
//
// requestParams := fetch.FetchRequestParams{Url: "http://www.google.com.br", Count: 2}
// result, err := fetch.FetchRequest(requestParams)
// if err != nil {
// logger.Panic(err)
// }
//
// data, _ := json.Marshal(result)
// logger.Printf(string(data))
//}
//
//func hasHelpArg() bool {
// return utils.AnyInSlice(os.Args, func(s string) bool { return s == "help" })
//}
//
//func printHelp() {
// fmt.Println("Usage: gourl <url> <fetchCount> [options]\n")
// fmt.Println("Arguments:")
// fmt.Println("<url> The URL that you want to fetch")
// fmt.Println("<fetchCount> Number of times that you want to fetch the URL (Default value is '1')\n")
// fmt.Println("Options:")
// fmt.Println("-v, --verbose Enables verbose logging")
// os.Exit(0)
//}