-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathraindata.go
42 lines (35 loc) · 1.1 KB
/
raindata.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
package main
import (
"fmt"
"flag"
"os"
"log"
"github.com/abhishekkr/goshare"
)
var (
logfile = flag.String("log-file", "rain-data.log", "to dump run-logs to")
)
func log_it(msg string){
f, err := os.OpenFile(*logfile, os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666)
if err != nil {
fmt.Println("error opening file: %v", err)
}
defer f.Close()
log.SetOutput(f)
log.Println(msg)
}
func banner(){
fmt.Println("**************************************************")
fmt.Println(" _____ _ _____ _ ")
fmt.Println(" | __ \\ (_) | __ \\ | | ")
fmt.Println(" | |__) |__ _ _ _ __ ______| | | | __ _| |_ __ _ ")
fmt.Println(" | _ // _` | | '_ \\______| | | |/ _` | __/ _` |")
fmt.Println(" | | \\ \\ (_| | | | | | | |__| | (_| | || (_| |")
fmt.Println(" |_| \\_\\__,_|_|_| |_| |_____/ \\__,_|\\__\\__,_|")
fmt.Println(" ")
fmt.Println("**************************************************")
}
func main(){
banner()
goshare.GoShare()
}