{
  "id": "go",
  "name": "Go",
  "homepage": "https://go.dev",
  "description": "An open source programming language that makes it easy to build simple, reliable, and efficient software.",
  "icon": "SimpleIcons:go",
  "executables": [
    "go"
  ],
  "dotfiles": {
    "paths": [
      "[appData]/go/env"
    ],
    "exclude": [
      "~/go/pkg/mod/",
      "[cacheHome]/go-build/"
    ],
    "secret": [],
    "side_effect": false,
    "machine_lines": [
      {
        "file": "[appData]/go/env",
        "match": {
          "prefix": [
            "GOPATH",
            "GOBIN",
            "GOCACHE",
            "GOMODCACHE",
            "GOTMPDIR"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Go toolchain",
    "description": "Build, test, run, format and manage modules. Flags come from the Fig completion data, which omits some options (for example -run and -count for go test).",
    "quality": "ai-draft",
    "base": "fig:go",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/go.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "build"
        ],
        "label": "Build packages",
        "description": "Compile packages and dependencies.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/go.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "packages",
            "label": "Packages",
            "description": "Defaults to the package in the current directory.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output",
            "label": "Output",
            "description": "File or directory for the result.",
            "type": "path",
            "option": [
              "-o"
            ],
            "path": {
              "kind": "any",
              "role": "output"
            },
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "v",
            "label": "Verbose",
            "description": "Print package names as they are compiled.",
            "type": "boolean",
            "option": [
              "-v"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "race",
            "label": "Race detector",
            "type": "boolean",
            "option": [
              "-race"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "trimpath",
            "label": "Trim paths",
            "type": "boolean",
            "option": [
              "-trimpath"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tags",
            "label": "Build tags",
            "description": "Comma-separated list of build tags.",
            "type": "string",
            "option": [
              "-tags"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ldflags",
            "label": "Linker flags",
            "description": "Arguments passed to go tool link.",
            "type": "string",
            "option": [
              "-ldflags"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "mod",
            "label": "Module mode",
            "type": "string",
            "option": [
              "-mod"
            ],
            "suggestions": [
              {
                "value": "readonly",
                "label": "readonly"
              },
              {
                "value": "vendor",
                "label": "vendor"
              },
              {
                "value": "mod",
                "label": "mod"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "a",
            "label": "Force rebuild",
            "type": "boolean",
            "option": [
              "-a"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "n",
            "label": "Print only",
            "description": "Print the commands but do not run them.",
            "type": "boolean",
            "option": [
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "x",
            "label": "Print commands",
            "type": "boolean",
            "option": [
              "-x"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "build",
            "label": "Build",
            "fields": [
              "packages",
              "output",
              "v"
            ],
            "required": []
          },
          {
            "id": "release",
            "label": "Trimmed build",
            "fields": [
              "packages",
              "output",
              "trimpath",
              "ldflags"
            ],
            "required": [],
            "set": {
              "trimpath": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "packages",
              "output",
              "v",
              "race",
              "trimpath"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "a",
              "n",
              "x",
              "mod",
              "ldflags",
              "tags"
            ]
          }
        ]
      },
      {
        "path": [
          "test"
        ],
        "label": "Test packages",
        "description": "Run tests in the current package (the package list is not offered; add it after the flags).",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/go.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "v",
            "label": "Verbose",
            "description": "Print package names as they are compiled.",
            "type": "boolean",
            "option": [
              "-v"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "race",
            "label": "Race detector",
            "type": "boolean",
            "option": [
              "-race"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "trimpath",
            "label": "Trim paths",
            "type": "boolean",
            "option": [
              "-trimpath"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tags",
            "label": "Build tags",
            "description": "Comma-separated list of build tags.",
            "type": "string",
            "option": [
              "-tags"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "mod",
            "label": "Module mode",
            "type": "string",
            "option": [
              "-mod"
            ],
            "suggestions": [
              {
                "value": "readonly",
                "label": "readonly"
              },
              {
                "value": "vendor",
                "label": "vendor"
              },
              {
                "value": "mod",
                "label": "mod"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "a",
            "label": "Force rebuild",
            "type": "boolean",
            "option": [
              "-a"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "n",
            "label": "Print only",
            "description": "Print the commands but do not run them.",
            "type": "boolean",
            "option": [
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "x",
            "label": "Print commands",
            "type": "boolean",
            "option": [
              "-x"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "json",
            "label": "JSON output",
            "type": "boolean",
            "option": [
              "-json"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "c",
            "label": "Compile only",
            "description": "Compile the test binary without running it.",
            "type": "boolean",
            "option": [
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "o",
            "label": "Test binary",
            "type": "path",
            "option": [
              "-o"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "verbose",
            "label": "Verbose tests",
            "fields": [
              "v",
              "race",
              "tags"
            ],
            "required": [],
            "set": {
              "v": [
                true
              ]
            }
          },
          {
            "id": "json",
            "label": "JSON results",
            "fields": [
              "json",
              "race"
            ],
            "required": [],
            "set": {
              "json": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "v",
              "race",
              "tags",
              "json"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "a",
              "n",
              "x",
              "mod",
              "trimpath",
              "c",
              "o"
            ]
          }
        ]
      },
      {
        "path": [
          "run"
        ],
        "label": "Run a package",
        "description": "Compile and run a Go program.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/go.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "package",
            "label": "Package or file",
            "description": "For example . or main.go.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "v",
            "label": "Verbose",
            "description": "Print package names as they are compiled.",
            "type": "boolean",
            "option": [
              "-v"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "race",
            "label": "Race detector",
            "type": "boolean",
            "option": [
              "-race"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "trimpath",
            "label": "Trim paths",
            "type": "boolean",
            "option": [
              "-trimpath"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tags",
            "label": "Build tags",
            "description": "Comma-separated list of build tags.",
            "type": "string",
            "option": [
              "-tags"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "mod",
            "label": "Module mode",
            "type": "string",
            "option": [
              "-mod"
            ],
            "suggestions": [
              {
                "value": "readonly",
                "label": "readonly"
              },
              {
                "value": "vendor",
                "label": "vendor"
              },
              {
                "value": "mod",
                "label": "mod"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "x",
            "label": "Print commands",
            "type": "boolean",
            "option": [
              "-x"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "run",
            "label": "Run",
            "fields": [
              "package",
              "race"
            ],
            "required": [
              "package"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "package",
              "race",
              "tags"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "mod",
              "trimpath",
              "v",
              "x"
            ]
          }
        ]
      },
      {
        "path": [
          "get"
        ],
        "label": "Add a dependency",
        "description": "Add a dependency to the current module and install it.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/go.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "url",
            "label": "Module",
            "description": "Module path with an optional @version.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "u",
            "label": "Update",
            "description": "Update to newer minor or patch releases.",
            "type": "boolean",
            "option": [
              "-u"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "t",
            "label": "Include tests",
            "type": "boolean",
            "option": [
              "-t"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "d",
            "label": "Download only",
            "type": "boolean",
            "option": [
              "-d"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "v",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "-v"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "add",
            "label": "Add module",
            "fields": [
              "url",
              "u"
            ],
            "required": [
              "url"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "url",
              "u",
              "t",
              "d",
              "v"
            ]
          }
        ]
      },
      {
        "path": [
          "mod",
          "tidy"
        ],
        "label": "Tidy go.mod",
        "description": "Make go.mod match the source code in the module.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/go.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "e",
            "label": "Proceed despite errors",
            "type": "boolean",
            "option": [
              "-e"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "v",
            "label": "Verbose",
            "description": "Print information about removed modules.",
            "type": "boolean",
            "option": [
              "-v"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "tidy",
            "label": "Tidy",
            "fields": [
              "v"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "e",
              "v"
            ]
          }
        ]
      },
      {
        "path": [
          "fmt"
        ],
        "label": "Format sources",
        "description": "Reformat package sources with gofmt.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/go.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "packages",
            "label": "Packages",
            "description": "Defaults to the current package.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "n",
            "label": "Print only",
            "description": "Print the commands that would run.",
            "type": "boolean",
            "option": [
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "x",
            "label": "Print commands",
            "type": "boolean",
            "option": [
              "-x"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "fmt",
            "label": "Format",
            "fields": [
              "packages"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "packages",
              "n",
              "x"
            ]
          }
        ]
      }
    ]
  }
}
