Skip to content

Commit 0ea435c

Browse files
committed
code cleaned up
1 parent a4c390a commit 0ea435c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

controllers/pv.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package controllers
22

33
import (
44
"encoding/json"
5-
"fmt"
65
"godemon/models"
76
"io/ioutil"
87
"os"
@@ -22,7 +21,6 @@ func deploy() {
2221
arch := "GOARCH=" + pr.Arch
2322
name := pr.Name
2423
os.Chdir(pr.Path)
25-
fmt.Println(pr)
2624
cmd := exec.Command("env", goos, arch, "go", "build", "-o", name)
2725
cmd.Stdout = os.Stdout
2826
cmd.Stderr = os.Stderr
@@ -66,14 +64,10 @@ func cnfFunc(command string, filepath string, modOrFile string) (string, string)
6664
json.Unmarshal(byteValue, &commands)
6765
for i := 0; i < len(commands.Commands); i++ {
6866
if command == commands.Commands[i].Name {
69-
fmt.Println(commands.Commands[i].Path)
70-
fmt.Println(commands.Commands[i].Option)
7167
filepath = commands.Commands[i].Path
7268
modOrFile = commands.Commands[i].Option
7369
}
7470
}
75-
fmt.Println(filepath, modOrFile)
76-
time.Sleep(10 * time.Second)
7771
return filepath, modOrFile
7872
}
7973

main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import (
88
)
99

1010
func main() {
11-
version := "2.1.1"
11+
cmd := exec.Command("printf", "\\e[1;34m%-6s\\e[m\n", "Starting godemon... \n")
12+
cmd.Stdout = os.Stdout
13+
cmd.Stderr = os.Stderr
14+
cmd.Run()
15+
version := "2.1.2"
1216
doneChan := make(chan bool)
1317
filepath, modOrFile, cnf, command, help, init, name, oso, arch := controllers.LoadCMD("", "")
1418
filepath, modOrFile = controllers.ProgramStarting(&cnf, filepath, modOrFile, command, help, version, init, name, oso, arch)

0 commit comments

Comments
 (0)