Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved error message, when a markdown file is missing … #491

Merged
merged 2 commits into from
Aug 8, 2019

Conversation

ubogdan
Copy link
Contributor

@ubogdan ubogdan commented Aug 8, 2019

Describe the PR
Removed pkg/errors dependency from whole project tree.
Finish PR #413
Removed an error handler that was introduced to fix #432 . error is nil all the time , the code works the same without that piece of code.

Relation issue
None

Additional context
None.

@pei0804
Copy link
Member

pei0804 commented Aug 8, 2019

Good job.

@pei0804
Copy link
Member

pei0804 commented Aug 8, 2019

Why does have more dependencies in go module?
We forgotten add dependencies?

@ubogdan
Copy link
Contributor Author

ubogdan commented Aug 8, 2019

if you speak about "go.mod"

  1. package "github.com/gin-gonic/gin" is used in example/ folder in most of them
  2. package "github.com/satori/go.uuid" is used in example/celler/model/account.go
  3. package "golang.org/x/tools" is used in operation.go

@pei0804
Copy link
Member

pei0804 commented Aug 8, 2019

It seems necessary.

Copy link
Member

@pei0804 pei0804 left a comment

Choose a reason for hiding this comment

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

LGTM

@pei0804 pei0804 merged commit 9710e4b into master Aug 8, 2019
@pei0804 pei0804 deleted the improve-error-messages branch August 8, 2019 12:44
@easonlin404
Copy link
Member

easonlin404 commented Aug 8, 2019

@swaggo/swaggo-core-team IMO, I think github.com/gin-gonic/gin and
github.com/satori/go.uuid these packages don't need to add in go.mod because all of these only be used in example. I purpose that adding go.mod in examples code itself is better.

Copy link
Member

@easonlin404 easonlin404 left a comment

Choose a reason for hiding this comment

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

leave comment #491 (comment)

@pei0804
Copy link
Member

pei0804 commented Aug 8, 2019

Sound good.
If so, are dependencies ignored for example code?

@easonlin404
Copy link
Member

no I mean github.com/gin-gonic/gin and github.com/satori/go.uuid these should be declare at their own example go.mod like:

github.com/swaggo/swag/tree/master/example/basic/go.mod
github.com/swaggo/swag/tree/master/example/celler/go.mod

not added in github.com/swaggo/swag/go.mod

@pei0804
Copy link
Member

pei0804 commented Aug 9, 2019

OK. I understand.

@pei0804
Copy link
Member

pei0804 commented Aug 9, 2019

I create PR.

@pei0804
Copy link
Member

pei0804 commented Aug 9, 2019

can not multi go.mod.

package github.com/swaggo/swag/example/celler: unknown import path "github.com/swaggo/swag/example/celler": ambiguous import: found github.com/swaggo/swag/example/celler in multiple modules:

@pei0804 pei0804 mentioned this pull request Aug 9, 2019
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.

Fail when module contains no package
3 participants