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

go mod tidy doesnt work if go.mod file is in src folder (cant find go.mod) #51

Open
rupamkhaitan opened this issue Jun 23, 2020 · 0 comments

Comments

@rupamkhaitan
Copy link

I have a root project where all my go code is inside sub-folder src directory and i need to run go mod tidy from top level .pre-commit-config.yaml (cause i believe there is no way to pass args)

Now My pre-commit config file has mentioned the files path (where my sub-folder src/go.mod file reside.. but still go mod tidy always show pass, doesn't do anything by downloading all missing package)

- repo: git://github.com/dnephin/pre-commit-golang
  rev: master
  hooks:
    - id: go-mod-tidy
      name:go-mod-tidy
      files: 'src/.*\.go'
@rupamkhaitan rupamkhaitan changed the title go mod tidy doesnt work if code is in src folder (cant find go.mod) go mod tidy doesnt work if go.mod file is in src folder (cant find go.mod) Jun 23, 2020
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

No branches or pull requests

1 participant