Skip to content

Fix Go imports#1801

Merged
egiptipavel merged 4 commits into
mainfrom
egiptipavel/fix-go-imports
Feb 16, 2023
Merged

Fix Go imports#1801
egiptipavel merged 4 commits into
mainfrom
egiptipavel/fix-go-imports

Conversation

@egiptipavel

Copy link
Copy Markdown
Collaborator

Description

  • Fixed bugs with imports described in issues
  • Moved representation of GoUtModel's in Go code to GoUtModelToCodeConverter
  • Created GoImportsResolver class for working with imports.

Fixes #1776
Fixes #1777

How to test

Manual tests

Tested on

package simple

import (
	"errors"
	_ "errors"
	e "errors"
	"github.com/pmezard/go-difflib/difflib"
	d "github.com/pmezard/go-difflib/difflib"
	"math"
	. "math"
)

func Test(match difflib.Match) d.Match {
	e.New("")
	errors.New("")
	n := math.NaN()
	IsNaN(n)
	return match
}

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@egiptipavel egiptipavel added ctg-bug-fix PR is fixing a bug lang-go Issue is related to Go support labels Feb 15, 2023
@egiptipavel egiptipavel merged commit 4413a7e into main Feb 16, 2023
@egiptipavel egiptipavel deleted the egiptipavel/fix-go-imports branch February 16, 2023 14:12
@alisevych alisevych added this to the 2023.03 Release milestone Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ctg-bug-fix PR is fixing a bug lang-go Issue is related to Go support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No support for import aliases Go tests are not generated when imports are needed for types inside a function body

3 participants