-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate.go
49 lines (35 loc) · 870 Bytes
/
generate.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
package main
import (
"bufio"
"fmt"
"os"
// "sync"
)
type generatorOptions struct {
templateSource string
envSource string
}
func (options *generatorOptions) Generate(templateSource, envSource string) {
consolereader := bufio.NewReader(os.Stdin)
fmt.Print("Enter your name : ")
input, err := consolereader.ReadString('\n')
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Println(input)
// wg := new(sync.WaitGroup)
// commands := []string{""}
// for _, str := range commands {
// wg.Add(1)
// go ExecCmd(str, wg)
// }
// wg.Wait()
}
func start() {
// consolereader := bufio.NewReader(os.Stdin)
fmt.Println("Welcome to the template generator. To get started, answer from the options below:")
fmt.Println("[0] Create a new file")
fmt.Println("[1] Edit an existing file")
// input, err := consolereader.ReadString('\n')
}