Skip to content
Snippets Groups Projects
Commit 0421360d authored by zf4's avatar zf4
Browse files

main format

parent 2238a261
No related branches found
No related tags found
No related merge requests found
Pipeline #80174 failed
......@@ -15,7 +15,8 @@ import (
)
const CMD_PROMPT = "> "
var craneType := 0
var craneType int
func main() {
println("Starting server")
......@@ -98,13 +99,20 @@ func HandleServerCommand(cmd string) {
case "bolt":
{
// Usage: bolt [pluginName] [boltName] [ancestorName1 ancestorName2 ...
crane.ProcessCraneTopology(com[1:])
if craneType == 1 {
crane.ProcessCraneTopology(com[1:])
} else {
fmt.Println("This is not a crane client")
}
}
case "submit":
{
// Usage: submit [jobSource] [outputFile]
crane.ProcessCraneJob(com[1:])
if craneType == 1 {
crane.ProcessCraneJob(com[1:])
} else {
fmt.Println("This is not a crane client")
}
}
default:
println("Invalid Command")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment