Skip to content

update gen code import style#293

Merged
xushiwei merged 5 commits into
goplus:mainfrom
visualfc:import_name
Oct 23, 2023
Merged

update gen code import style#293
xushiwei merged 5 commits into
goplus:mainfrom
visualfc:import_name

Conversation

@visualfc
Copy link
Copy Markdown
Member

update code import style.

  1. import "fmt" fmt => import "fmt"

  2. github.com/mypkg/foo package foo2
    import foo2 "github.com/mypkg/foo"

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5f657ff) 95.43% compared to head (74790fe) 95.43%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #293   +/-   ##
=======================================
  Coverage   95.43%   95.43%           
=======================================
  Files          14       14           
  Lines        6478     6484    +6     
=======================================
+ Hits         6182     6188    +6     
  Misses        231      231           
  Partials       65       65           
Files Coverage Δ
package.go 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread package.go Outdated
name = ident(pkgName)
} else {
paths := strings.Split(pkgImport.Types.Path(), "/")
if n := len(paths); n > 0 && paths[n-1] != pkgName {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe using path.Base(pkgImport.Types.Path()) != pkgName is better?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@xushiwei xushiwei merged commit 3d1b2e0 into goplus:main Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants