Skip to content

Commit 50b961a

Browse files
committed
Code refactored
1 parent 8955904 commit 50b961a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

controllers/functions.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import (
66
"os"
77
)
88

9-
//TODO("CREATE NEW MODULES - TimeLog, Executable, JsonLoad, Kill, LogsToCli, LoadFlags - everything with private functions")
10-
119
func ProgramStarting(cnf *string, filepath string, modOrFile string, command string, help *bool, version string, init bool, name string, oso string, arch string, hOS string) (string, string) {
1210
if *cnf == "cmd" {
1311

errors/errorHandlingPv.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package errors
22

3-
import "fmt"
3+
import (
4+
"github.com/fatih/color"
5+
)
46

57
func errorHandle(err error) {
68
if err != nil {
7-
fmt.Println(err)
9+
color.Cyan(err.Error())
810
}
911
}

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//TODO - refactore code to avoid using the Path parameter in project.json and while creating project
2+
13
package main
24

35
import (
@@ -16,7 +18,7 @@ import (
1618
func main() {
1719
hostInfo := [2]string{build.Default.GOOS, build.Default.GOARCH}
1820
color.Cyan("Godemon starting...")
19-
version := "2.5.6"
21+
version := "2.5.7"
2022
doneChan := make(chan bool)
2123
filepath, modOrFile, cnf, command, help, init, name, oso, arch := cliTools.LoadCMD("", "")
2224
filepath, modOrFile = controllers.ProgramStarting(&cnf, filepath, modOrFile, command, help, version, init, name, oso, arch, hostInfo[0])

0 commit comments

Comments
 (0)