Skip to content

Commit 0e5d056

Browse files
committed
code cleaned up,
updated readme.md
1 parent 12c8e5e commit 0e5d056

File tree

4 files changed

+30
-17
lines changed

4 files changed

+30
-17
lines changed

controllers/executables.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,6 @@ import (
55
"os/exec"
66
)
77

8-
func killProcess(hOS string) {
9-
if hOS == "windows" {
10-
cmd := exec.Command("taskkill", "/IM", "app-godemon-app-godemon-tmp-generated.exe", "/F")
11-
cmd.Stdout = os.Stdout
12-
cmd.Stderr = os.Stderr
13-
err := cmd.Run()
14-
ErrorHandle(err)
15-
} else {
16-
cmd := exec.Command("killall", "-9", "app-godemon-app-godemon-tmp-generated")
17-
cmd.Stdout = os.Stdout
18-
cmd.Stderr = os.Stderr
19-
err := cmd.Run()
20-
ErrorHandle(err)
21-
}
22-
}
23-
248
func execMOD(hOS string) {
259
if hOS == "windows" {
2610
cmd := exec.Command("app-godemon-app-godemon-tmp-generated.exe")

controllers/kill.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package controllers
2+
3+
import (
4+
"os"
5+
"os/exec"
6+
)
7+
8+
func killCMDgen(hOS string) *exec.Cmd {
9+
var cmd *exec.Cmd
10+
if hOS == "windows" {
11+
cmd = exec.Command("taskkill", "/IM", "app-godemon-app-godemon-tmp-generated.exe", "/F")
12+
} else {
13+
cmd = exec.Command("killall", "-9", "app-godemon-app-godemon-tmp-generated")
14+
}
15+
return cmd
16+
}
17+
18+
func killProcess(hOS string) {
19+
cmd := killCMDgen(hOS)
20+
cmd.Stdout = os.Stdout
21+
cmd.Stderr = os.Stderr
22+
err := cmd.Run()
23+
ErrorHandle(err)
24+
}

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
func main() {
1414
hostInfo := [2]string{build.Default.GOOS, build.Default.GOARCH}
1515
color.Blue("Godemon starting...")
16-
version := "2.5.3"
16+
version := "2.5.4"
1717
doneChan := make(chan bool)
1818
filepath, modOrFile, cnf, command, help, init, name, oso, arch := controllers.LoadCMD("", "")
1919
filepath, modOrFile = controllers.ProgramStarting(&cnf, filepath, modOrFile, command, help, version, init, name, oso, arch, hostInfo[0])

readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ If you need help with clie use command `./godemon -help`
2828
1. Download source code from releases or use `git clone https://github.com/nProgrammer/godemon`
2929
2. `cd ./godemon`
3030
3. `go build`
31+
32+
If Windows:
33+
4. Move `godemon.exe` to `System32`
34+
35+
On Linux:
3136
4. `sudo cp godemon /bin/godemon`
3237

3338
### Installing `godemon` from `godemon.exe`

0 commit comments

Comments
 (0)