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
-3
votes
2 answers

Creating an Array of Objects in Range Loop Golang

I am a newbie in Golang and trying out things. I have two requirements, Print the Number of Occurrences of the Values in an Array - This is done. Creating a Key-Value of the Key and the Value in an Array - Still working on it. Let me share, what I…
-3
votes
1 answer

Not able to compile simple project in Goland

While executing a very simple project in Goland IDE, I see following errors. Tried setting GO111MODULE=on/off/auto.. Didn't make any difference!! Any idea? Logs: GOROOT=/usr/local/go #gosetup GOPATH=/Users//Documents/workspace/
ios_mxe
  • 115
  • 2
  • 12
-3
votes
1 answer

How shall I add Java class file?

I am using Goland IDE to build microservice in Go. If I have to write tests in Java, can Goland IDE support that. I don't see the support for Java in Goland. But wanted to check with folks who are experienced in Goland.
fly.bird
  • 111
  • 3
  • 10
-3
votes
1 answer

redeclaring a struct instance to same variable name is returning old object in golang

I am trying to create a bunch of struct instance and append to a list after setting some values. This was reusing the variable. This was not working as it turns out golang was returning the same object. This is against what I expect. Is there any…
joe
  • 1,136
  • 9
  • 17
-3
votes
2 answers

why strict code format on keywords in go lang

As every new programer starting in Go 1st think you see is, strict code format. Means: //Valid func foo(){ } //Invalid func foo() { } Same goes for if-else that else should be in same line where if ends,…
Sumit Singh
  • 15,743
  • 6
  • 59
  • 89
-3
votes
2 answers

How to call unexported function within package?

I'm trying to write a package to work with. Here is sample code: package redis import ( "fmt" "github.com/gomodule/redigo/redis" "log" "os" ) var conn redis.Conn func init() { // code to set conn variable } func do(command…
Jakupov
  • 1,656
  • 2
  • 11
  • 14
-3
votes
1 answer

Length of channel is zero after adding element

I learn buffered channels in Go and some magic is hidden from me. I have this code package main import ( "fmt" ) func write(ch chan int) { for i := 1; i <= 5; i++ { ch <- i fmt.Printf("Channel's length is %d\n", len(ch)) …
Dimitry
  • 359
  • 4
  • 13
-3
votes
1 answer

GO: error while importing my go file

This is the project structure /bruteforce --/src ----/services ------/bruteforce.go ----/start ------/workergenerator.go In bruteforce.go i used "package services", and in workergenerator.go "package main". Now, i wrote a simple…
Simon
  • 95
  • 1
  • 11
-4
votes
1 answer

Goland: How to use a custom modfile instead of go.mod?

My project consists of multiple go modules which I need to work on simultaneously. This is made easy by using the replace directive in the go.mod file. Further, in order to prevent this change from getting accidentally checked in, the go tools…
cosmiczilch
  • 43
  • 2
  • 7
-5
votes
2 answers

how could I add redis in GoLand

I couldn't find the add new redis database options in GoLand IDE,thanks you very mush. enter image description here
Colin_Deng
  • 17
  • 2
-5
votes
1 answer

compile a go source file programmatically

I would like to build a Go server which receives Go source code from a client such as a react application and then compiles this code. Can someone provide a clear explanation of steps to achieve this in Go and provide the Go packages that are used…
Neo
  • 717
  • 2
  • 11
  • 26
-7
votes
1 answer

Hi, I started gogland. I can't running

I started gogland. I have a running problem.
yahox
  • 21
  • 6
1 2 3
35
36