Custom Runner Golang


#1

I want to run my code using Golang and cloud9, the idea is starting my code passing an argument as parameter in a custom Runner. I have follow the instructions on https://docs.c9.io/docs/custom-runners , but my code do not run when I click the botton run.

the message that display is

Your code is running :)                                                                                                        
panic: open : no such file or directory                                                                                        
                                                                                                                               
goroutine 1 [running]:                                                                                                         
main.main()                                                                                                                    
        /home/ubuntu/workspace/src/golandservicetest/main.go:33 +0xbe                                                          
                                                                                                                               
goroutine 17 [syscall, locked to thread]:                                                                                      
runtime.goexit()                                                                                                               
        /usr/local/go/src/runtime/asm_amd64.s:1721 +0x1                                                                        
exit status 2                                                                                                                  
                                                                                                                               
                                                                                                                               
Process exited with code: 1

I have tried the configurations below:

{
    "cmd": ["go","run","/home/ubuntu/workspace/src/golandservicetest/main.go", "-fileconfig=/home/ubuntu/workspace/.c9/metadata/workspace/src/golandservicetest/config.ini"],
    "selector": "main.go",
    "info": "it works:)"
}

{
“cmd”: [“go”,“run”,"/home/ubuntu/workspace/src/golandservicetest/main.go", “-fileconfig=’/home/ubuntu/workspace/.c9/metadata/workspace/src/golandservicetest/config.ini’”],
“selector”: “main.go”,
“info”: “it works:)”
}

{
“cmd”: [“go”,“run”,"/home/ubuntu/workspace/src/golandservicetest/main.go", “-fileconfig=‘config.ini’”],
“selector”: “main.go”,
“info”: “it works:)”
}

{
“cmd”: [“go”,“run”,“main.go”, “-fileconfig=‘config.ini’”],
“selector”: “main.go”,
“info”: “it works:)”
}

but no one works, the odd is that the instrution that I want to custom by Command Line works, but I do not want that every time that i will run my code go to the command line and execute the istruction, that i am looking for is simplify this process

go run main.go -fileconfig=config.ini 

note: This is my workspace https://ide.c9.io/carlos_andres/golang_test_service

Thanks in advance