CheckOs checks Operation system and generates MakeFile and `go build` command Based on Project.Unixbase
()
| 123 | // CheckOs checks Operation system and generates MakeFile and `go build` command |
| 124 | // Based on Project.Unixbase |
| 125 | func (p *Project) CheckOS() { |
| 126 | p.OSCheck = make(map[string]bool) |
| 127 | |
| 128 | if runtime.GOOS != "windows" { |
| 129 | p.OSCheck["UnixBased"] = true |
| 130 | } |
| 131 | if runtime.GOOS == "linux" { |
| 132 | p.OSCheck["linux"] = true |
| 133 | } |
| 134 | if runtime.GOOS == "darwin" { |
| 135 | p.OSCheck["darwin"] = true |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | // ExitCLI checks if the Project has been exited, and closes |
| 140 | // out of the CLI if it has |