![]() ![]() The IDE runs 'go mod download' automatically after each execution of 'go list -m'. You can select between the following options:Įnable for all projects: activates automatic download of Go dependencies for all projects that you open. Open settings by pressing Control+Alt+S and navigate to Go | Go Modules.Ĭlick the Download Go module dependencies drop-down list and select the necessary option. Disable automatic download of Go module dependencies You can configure this behavior in settings. Select the Enable Go modules integration checkbox.īy default, GoLand downloads all the necessary dependencies when you open a project or modify go.mod. ![]() Press Control+Alt+S to open the IDE settings and then select Go | Go Modules. If you pulled your Go modules project from Github, you need to enable Go modules manually. If you create a new Go modules project in the IDE, Go modules are already enabled. The version of each Go Module is shown in a dimmed font color to help you distinguish between them. In the Project tool window ( View | Tool Windows | Project), Go modules are displayed with their full import path. Read more about environment variables in the Environment variables section. For example, the GOPROXY environment variable. (Optional) In the Environment field, specify environment variables that you need for your project. (Optional) Select or clear the Enable vendoring support automatically checkbox. To change or install a new version of Go SDK, click the Add SDK… button and select Local… to choose the Go SDK version on your hard drive, or select Download… to download Go SDK from the official repository. Usually, the location is defined automatically. In the GOROOT field, specify the location of your Go installation. In the New Project dialog, select Go from the list of available projects. Create a project with Go modules integrationĪlternatively, click New Project in the Welcome to GoLand dialog. With Go modules, you do not need to keep your project files under GOPATH and can easily manage dependencies in your project. By default, GoLand suggests creating a Go modules project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |