Questions tagged [goland]

GoLand is an IDE by JetBrains for the Go programming language

Links:

  1. Official Site
  2. Documentation Pages
  3. Download Page
  4. The GoLand Blog
538 questions
99
votes
5 answers

goland how to use gofmt?

I started learning go and installed GoLand from JetBrains. I am reading the book The Go Programming Language, and in the first chapter author strongly recommends using the gofmt tool before each save. How I can follow this recommendation in GoLand?
Mikita Melnikau
  • 1,655
  • 2
  • 15
  • 30
99
votes
5 answers

Execute gofmt on file save in IntelliJ

I use IntelliJ with the Golang plugin. Is it possible to configure the IDE to execute gofmt on file save?
Myles McDonnell
  • 12,943
  • 17
  • 66
  • 116
96
votes
23 answers

GoLand (JetBrains) shows error message "Unresolved Reference". But Code compiles and runs

I am writing a project using the Go language with GoLand IDE by Jetbrains. While writing the code, GoLand shows me an error message such as "unresolved reference" when the reference do exist and that the program compiles and runs correctly. Here is…
David
  • 971
  • 1
  • 5
  • 4
90
votes
7 answers

How to remove unnecessary blank line on code formatting in IntelliJ?

Is it possible to remove empty/blank lines using code formatting in Intellij IDEA?
Eugene
  • 59,186
  • 91
  • 226
  • 333
75
votes
8 answers

Is there a way to sync settings across JetBrains IDEs?

What is the best way to sync similar settings across JetBrains IDEs? For example I have PyCharm and PhpStorm, both of which support CSS and HTML, and I would like to have all of the syntax coloring, inspections, etc. be the same for both PyCharm and…
orome
  • 45,163
  • 57
  • 202
  • 418
43
votes
6 answers

How do I configure goland to recognize 'mod' packages?

I am taking go1.11rc1 for a spin and the first thing I noticed is that goland does not recognize imports. The goland version announcement says: "support for Go modules out of the box (formerly known as vgo)" Anyone know how to fix this? Problem:…
Steve Tarver
  • 3,030
  • 2
  • 25
  • 33
30
votes
1 answer

How to stop GoLand from hiding/folding return statements?

Since the recent GoLand update I am seeing all return statements folded, as in the image below. How can I make GoLand show all return statements not folded or hidden, as they are in the actual code?
sdgluck
  • 24,894
  • 8
  • 75
  • 90
29
votes
5 answers

How to stop GoLand from auto removal of unused imports?

I am working with JetBrains GoLand and wondering if it's possible to somehow disable the auto removal of unused imports. I have searched the JetBrains forums earlier and there is no such information specifically for Goland.
nombreinvicto
  • 451
  • 1
  • 4
  • 6
27
votes
3 answers

Running 'goimports' on save in GoLand

I'm using GoLand IDE to code in Go. When I save a file, I'd like that the unused imports disappear (like VS code) I have enable "Optimize imports" in "Code" -> "Show reformat file dialog". But when I save the file, imports it's still present
matiux
  • 493
  • 1
  • 6
  • 16
27
votes
7 answers

How to set up debugging in GoLand?

I am trying out GoLand and hear that the debugger is supposedly awesome, but I can’t find any documentation explaining how to set it up (GoLand is in preview stage, so that’s not really surprising). My use case: I am writing a REST API to which I…
Zoyd
  • 3,449
  • 1
  • 18
  • 27
23
votes
1 answer

How to exclude or skip specific directory while running 'go test'

go test $(go list ./... | grep -v /vendor/) -coverprofile .testCoverage.txt I am using the above command to test the files but there is 1 folder with the name "Store" that I want to exclude from tests. How it can be done?
kishorK
  • 453
  • 2
  • 7
  • 16
21
votes
7 answers

How do I get IntelliJ Terminal to work properly with Oh My Zsh?

I love Oh My Zsh, but it has never worked properly in the JetBrains product's Terminals: cannot find executables cannot use version managers like pyenv, sdkman, rvm Oh My Zsh is zsh shell augmentation, so the actual problem could be reduced to…
Steve Tarver
  • 3,030
  • 2
  • 25
  • 33
20
votes
1 answer

What does "download and install 32-bit jetbrains runtime" actually do in IDE GoLand?

I'm a newbie,today I'm try to install GoLand. It has a choice called "Download and install 32-bit Jetbrains Runtime".The image: I deselect and install it but I also could run my first hello world successfully.I try to search it in Google but…
jizhihaoSAMA
  • 12,336
  • 9
  • 27
  • 49
17
votes
2 answers

Cannot resolve import in .proto file

I have created following .proto file in the path: microservice/internal/proto-files/domain/repository.proto syntax = "proto3"; package domain; option go_package = "microservice/internal/gRPC/domain"; message Repository { int64 id = 1; string…
Siavoosh
  • 181
  • 1
  • 1
  • 5
17
votes
4 answers

decoding dwarf section info at offset 0x0: too short

I am using JetBrains GoLand and I am trying to debug my go file and I am getting the following error: decoding dwarf section info at offset 0x0: too short I tried to find an answer here at StackOverflow but unfortunately, I didn't get any…
Nir Berko
  • 1,368
  • 1
  • 13
  • 33
1
2 3
35 36