{
  "$schema": "https://json-schema.org/schema",
  "version": 2,
  "title": "Serve executor",
  "description": "Runs a Go program using the `go run` command",
  "type": "object",
  "properties": {
    "main": {
      "type": "string",
      "description": "Path to the file containing the main() function",
      "x-completion-type": "file",
      "x-completion-glob": "main.go",
      "x-priority": "important"
    },
    "cmd": {
      "type": "string",
      "description": "Name of the go binary to use, default is go",
      "default": "go"
    },
    "cwd": {
      "type": "string",
      "description": "Working directory from which to run the application",
      "x-completion-type": "directory"
    },
    "args": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Extra args when starting the app",
      "alias": "arguments"
    },
    "flags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Flags to pass to the go compiler"
    }
  },
  "required": ["main"]
}
