> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/8.9/analyzing-source-code/languages/go.md).

# Go

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* SonarQube scanner should run on an x86-64 Windows, macOS or Linux machine.
* You need the [Go](https://golang.org/) installation on the scanner machine only if you want to import coverage data.

## Language-specific properties <a href="#language-specific-properties" id="language-specific-properties"></a>

You can discover and update the Go-specific [Analysis parameters](/sonarqube-server/8.9/analyzing-source-code/analysis-parameters.md) in **Administration > General Settings > Go**

By default, all the `vendor` directories are excluded from the analysis. However, you can change the property `sonar.go.exclusions` to a different pattern if you want to force their analysis (not recommended).

## sonar-project.properties sample <a href="#sonar-project-properties" id="sonar-project-properties"></a>

Here is a first version of a `sonar-project.properties` file, valid for a simple `Go` project:

```css-79elbk
  sonar.projectKey=com.company.projectkey1
  sonar.projectName=My Project Name

  sonar.sources=.
  sonar.exclusions=**/*_test.go

  sonar.tests=.
  sonar.test.inclusions=**/*_test.go
```

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Test coverage and execution](/sonarqube-server/8.9/analyzing-source-code/test-coverage-and-execution.md)
* [Importing third-party issues](/sonarqube-server/8.9/analyzing-source-code/importing-external-issues/importing-third-party-issues.md) (GoVet, GoLint, GoMetaLinter)

## Issue tracker <a href="#issue-tracker" id="issue-tracker"></a>

Check the [issue tracker](https://sonarsource.atlassian.net/jira/software/c/projects/SONARSLANG/boards/97) for this language.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/8.9/analyzing-source-code/languages/go.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
