-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
41 lines (31 loc) · 831 Bytes
/
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
package main
import (
"fmt"
"log"
"os"
sett "github.com/Verassitnh/live/config"
)
func main() {
dir, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
sett.GetSettings(dir, ".liverc")
fmt.Println("Hello World!")
// NOTE: This is commented out to test sett.GetSettings()
// fmt.Print("What command would you like to run?\nEnter text: ")
// scanner := bufio.NewScanner(os.Stdin)
// scanner.Scan()
// command := make([]string, 0)
// for _, element := range strings.Split(scanner.Text(), " ") {
// command = append(command, element)
// }
// go exec.Command(command)
// chann := make(chan fsnotify.Event)
// go fswatch.Watch(dir, true, chann)
// fmt.Println("Watching")
// for range chann {
// log.Printf("\n\n####:: restarted process %q ::####\n\n", command[0])
// exec.Command(command)
// }
}