Skip to content
New issue

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

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

Already on GitHub? # to your account

add go.mod for example directory #131

Merged
merged 1 commit into from
Nov 23, 2021
Merged

add go.mod for example directory #131

merged 1 commit into from
Nov 23, 2021

Conversation

ktr0731
Copy link
Owner

@ktr0731 ktr0731 commented Nov 23, 2021

In the latest Go, examples in _example can't run directly because these examples depend on some untracked libraries.

$ go run ./_example/cli
_example/cli/main.go:11:2: no required module provides package github.com/mattn/go-isatty; to add it:
        go get github.com/mattn/go-isatty
_example/cli/main.go:12:2: no required module provides package github.com/spf13/pflag; to add it:
        go get github.com/spf13/pflag

To avoid this, I added another go.mod to example directory (renamed from _example).

@ktr0731 ktr0731 self-assigned this Nov 23, 2021
@codecov
Copy link

codecov bot commented Nov 23, 2021

Codecov Report

Merging #131 (376751b) into master (35bbbaa) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #131   +/-   ##
=======================================
  Coverage   85.73%   85.73%           
=======================================
  Files           5        5           
  Lines         764      764           
=======================================
  Hits          655      655           
  Misses         95       95           
  Partials       14       14           

@ktr0731 ktr0731 merged commit 92a96ad into master Nov 23, 2021
@ktr0731 ktr0731 deleted the example-mod branch November 23, 2021 05:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant