You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
510 B
Go
31 lines
510 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"periodic/prddeploy/commands"
|
|
)
|
|
|
|
func main() {
|
|
|
|
if len(os.Args) < 2 {
|
|
fmt.Fprintf(os.Stderr, "Usage: %s <command> [args...]", os.Args[0])
|
|
os.Exit(1)
|
|
}
|
|
|
|
switch os.Args[1] {
|
|
case "upload_file":
|
|
ufa := commands.UploadFileArgs{}
|
|
ufa.ReadArgs()
|
|
commands.UploadFile(ufa)
|
|
case "run_command":
|
|
rca := commands.RunCommandArgs{}
|
|
rca.ReadArgs()
|
|
commands.RunCommand(rca)
|
|
default:
|
|
fmt.Fprintf(os.Stderr, "Command not found: %s\n", os.Args[1])
|
|
os.Exit(1)
|
|
}
|
|
}
|