gotests icon indicating copy to clipboard operation
gotests copied to clipboard

Intellij Idea Plugin

Open iMaxopoly opened this issue 8 years ago • 5 comments

Hi, it would be neat to see a plugin for the aforementioned added. Golang Plugin for Intellij has become quite mature overtime.

Thank you for this amazing work.

iMaxopoly avatar Aug 29 '16 03:08 iMaxopoly

Hi @kryptodev and thanks! Apologies for the late reply, I was away on vacation.

A plugin would be great, but unfortunately I don't know the first thing about Intellij. I'll leave this issue open in case someone wants to pick it up.

If someone makes their own repo with the plugin, I'll gladly link to it in the README.

cweill avatar Sep 15 '16 20:09 cweill

Support for gotests is included into Goland (similar product from the same vendor)

Right click on the function to test, GotoTestsGenerate test

epsimatic avatar Jul 05 '18 10:07 epsimatic

It'll be cool add info about Intellij Goland to readme IDE: IntelliJ Goland Shortcut: Ctrl+Shift+T Link to help: https://www.jetbrains.com/help/go/run-debug-configuration-for-go-test.html

mekegi avatar Jul 21 '18 21:07 mekegi

I see a bug when using gotest to generate inside of GoLand. GoLand 2018.2.3 Build #GO-182.4505.32, built on September 20, 2018 JRE: 1.8.0_152-release-1248-b8 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.13.6

go version go1.11 darwin/amd64

  1. Select section of code i.e. function
  2. Push Cmd+Shift+T
  3. Select Generate for selection
  4. Generated code is using a variable of 'tt' and there isn't a variable like '_,tt := ' in the for loop, shows as error. func Test_checkUpdate(t *testing.T) { tests := []struct { name string }{ // TODO: Add test cases. } for range tests { t.Run(tt.name, func(t *testing.T) { checkUpdate() }) } }

gcstang avatar Sep 27 '18 20:09 gcstang

@gcstang it has nothing to do with GoLand, it's #32

zolotov avatar Oct 08 '18 12:10 zolotov