Merge branch 'master' into drop-go111module
This commit is contained in:
commit
22366116c3
8
.github/ISSUE_TEMPLATE/question.md
vendored
8
.github/ISSUE_TEMPLATE/question.md
vendored
@ -1,12 +1,10 @@
|
|||||||
---
|
---
|
||||||
name: ask a question
|
name: ask a question
|
||||||
about: ask us question - assume stackoverflow's guidelines apply here
|
about: ask a question - assume stackoverflow's guidelines apply here
|
||||||
title: 'q: ( your question title goes here )'
|
title: your question title goes here
|
||||||
labels: 'kind/question, status/triage, area/v2'
|
labels: 'kind/question, status/triage, area/v2'
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## my question is...
|
my question is...
|
||||||
|
|
||||||
_**( Put the question text here )**_
|
|
||||||
|
39
.github/ISSUE_TEMPLATE/v1-bug-report.md
vendored
39
.github/ISSUE_TEMPLATE/v1-bug-report.md
vendored
@ -1,28 +1,32 @@
|
|||||||
---
|
---
|
||||||
name: v1 bug report
|
name: v1 bug report
|
||||||
about: Create a report to help us fix v1 bugs
|
about: Create a report to help us fix v1 bugs
|
||||||
title: 'v1 bug: ( your bug title goes here )'
|
title: 'your bug title goes here'
|
||||||
labels: 'kind/bug, status/triage, area/v1'
|
labels: 'kind/bug, status/triage, area/v1'
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## my urfave/cli version is
|
## My urfave/cli version is
|
||||||
|
|
||||||
_**( Put the version of urfave/cli that you are using here )**_
|
_**( Put the version of urfave/cli that you are using here )**_
|
||||||
|
|
||||||
## Checklist
|
## Checklist
|
||||||
|
|
||||||
* [ ] Are you running the latest v1 release? The list of releases is [here](https://github.com/urfave/cli/releases).
|
- [ ] Are you running the latest v1 release? The list of releases is [here](https://github.com/urfave/cli/releases).
|
||||||
* [ ] Did you check the manual for your release? The v1 manual is [here](https://github.com/urfave/cli/blob/master/docs/v1/manual.md)
|
- [ ] Did you check the manual for your release? The v1 manual is [here](https://github.com/urfave/cli/blob/master/docs/v1/manual.md).
|
||||||
* [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.
|
- [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.
|
||||||
|
|
||||||
## Dependency Management
|
## Dependency Management
|
||||||
|
|
||||||
- [ ] My project is using go modules.
|
<!--
|
||||||
- [ ] My project is using vendoring.
|
Delete any of the following that do not apply:
|
||||||
- [ ] My project is automatically downloading the latest version.
|
-->
|
||||||
- [ ] I am unsure of what my dependency management setup is.
|
|
||||||
|
- My project is using go modules.
|
||||||
|
- My project is using vendoring.
|
||||||
|
- My project is automatically downloading the latest version.
|
||||||
|
- I am unsure of what my dependency management setup is.
|
||||||
|
|
||||||
## Describe the bug
|
## Describe the bug
|
||||||
|
|
||||||
@ -34,23 +38,30 @@ Describe the steps or code required to reproduce the behavior
|
|||||||
|
|
||||||
## Observed behavior
|
## Observed behavior
|
||||||
|
|
||||||
What did you see happen immediately after the reproduction steps above?
|
What did you see happen immediately after the reproduction steps
|
||||||
|
above?
|
||||||
|
|
||||||
## Expected behavior
|
## Expected behavior
|
||||||
|
|
||||||
What would you have expected to happen immediately after the reproduction steps above?
|
What would you have expected to happen immediately after the
|
||||||
|
reproduction steps above?
|
||||||
|
|
||||||
## Additional context
|
## Additional context
|
||||||
|
|
||||||
Add any other context about the problem here.
|
Add any other context about the problem here.
|
||||||
|
|
||||||
If the issue relates to a specific open source Github repo, please link that repo here.
|
If the issue relates to a specific open source Github repo, please
|
||||||
|
link that repo here.
|
||||||
|
|
||||||
If you can reproduce this issue with a public CI system, please link a failing build here.
|
If you can reproduce this issue with a public CI system, please
|
||||||
|
link a failing build here.
|
||||||
|
|
||||||
## Want to fix this yourself?
|
## Want to fix this yourself?
|
||||||
|
|
||||||
We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it. You'll want to base the PR off the `v1` branch, all `v1` bug fix releases will be made from that branch.
|
We'd love to have more contributors on this project! If the fix for
|
||||||
|
this bug is easily explained and very small, free free to create a
|
||||||
|
pull request for it. You'll want to base the PR off the `v1`
|
||||||
|
branch, all `v1` bug fix releases will be made from that branch.
|
||||||
|
|
||||||
## Run `go version` and paste its output here
|
## Run `go version` and paste its output here
|
||||||
|
|
||||||
|
39
.github/ISSUE_TEMPLATE/v2-bug-report.md
vendored
39
.github/ISSUE_TEMPLATE/v2-bug-report.md
vendored
@ -1,28 +1,32 @@
|
|||||||
---
|
---
|
||||||
name: v2 bug report
|
name: v2 bug report
|
||||||
about: Create a report to help us fix v2 bugs
|
about: Create a report to help us fix v2 bugs
|
||||||
title: 'v2 bug: ( your bug title goes here )'
|
title: 'your bug title goes here'
|
||||||
labels: 'kind/bug, area/v2, status/triage'
|
labels: 'kind/bug, area/v2, status/triage'
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## my urfave/cli version is
|
## My urfave/cli version is
|
||||||
|
|
||||||
_**( Put the version of urfave/cli that you are using here )**_
|
_**( Put the version of urfave/cli that you are using here )**_
|
||||||
|
|
||||||
## Checklist
|
## Checklist
|
||||||
|
|
||||||
* [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases).
|
- [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases).
|
||||||
* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md)
|
- [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md)
|
||||||
* [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.
|
- [ ] Did you perform a search about this problem? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.
|
||||||
|
|
||||||
## Dependency Management
|
## Dependency Management
|
||||||
|
|
||||||
- [ ] My project is using go modules.
|
<!--
|
||||||
- [ ] My project is using vendoring.
|
Delete any of the following that do not apply:
|
||||||
- [ ] My project is automatically downloading the latest version.
|
-->
|
||||||
- [ ] I am unsure of what my dependency management setup is.
|
|
||||||
|
- My project is using go modules.
|
||||||
|
- My project is using vendoring.
|
||||||
|
- My project is automatically downloading the latest version.
|
||||||
|
- I am unsure of what my dependency management setup is.
|
||||||
|
|
||||||
## Describe the bug
|
## Describe the bug
|
||||||
|
|
||||||
@ -34,23 +38,30 @@ Describe the steps or code required to reproduce the behavior
|
|||||||
|
|
||||||
## Observed behavior
|
## Observed behavior
|
||||||
|
|
||||||
What did you see happen immediately after the reproduction steps above?
|
What did you see happen immediately after the reproduction steps
|
||||||
|
above?
|
||||||
|
|
||||||
## Expected behavior
|
## Expected behavior
|
||||||
|
|
||||||
What would you have expected to happen immediately after the reproduction steps above?
|
What would you have expected to happen immediately after the
|
||||||
|
reproduction steps above?
|
||||||
|
|
||||||
## Additional context
|
## Additional context
|
||||||
|
|
||||||
Add any other context about the problem here.
|
Add any other context about the problem here.
|
||||||
|
|
||||||
If the issue relates to a specific open source Github repo, please link that repo here.
|
If the issue relates to a specific open source Github repo, please
|
||||||
|
link that repo here.
|
||||||
|
|
||||||
If you can reproduce this issue with a public CI system, please link a failing build here.
|
If you can reproduce this issue with a public CI system, please
|
||||||
|
link a failing build here.
|
||||||
|
|
||||||
## Want to fix this yourself?
|
## Want to fix this yourself?
|
||||||
|
|
||||||
We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it.
|
We'd love to have more contributors on this project! If the fix for
|
||||||
|
this bug is easily explained and very small, free free to create a
|
||||||
|
pull request for it.
|
||||||
|
|
||||||
## Run `go version` and paste its output here
|
## Run `go version` and paste its output here
|
||||||
|
|
||||||
```
|
```
|
||||||
|
16
.github/ISSUE_TEMPLATE/v2-feature-request.md
vendored
16
.github/ISSUE_TEMPLATE/v2-feature-request.md
vendored
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: v2 feature request
|
name: v2 feature request
|
||||||
about: Suggest an improvement for v2
|
about: Suggest an improvement for v2
|
||||||
title: 'v2 feature: ( your feature title goes here )'
|
title: 'your feature title goes here'
|
||||||
labels: 'type/feature, area/v2, status/triage'
|
labels: 'type/feature, area/v2, status/triage'
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
@ -10,16 +10,19 @@ assignees: ''
|
|||||||
## Checklist
|
## Checklist
|
||||||
|
|
||||||
* [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases).
|
* [ ] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases).
|
||||||
* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md)
|
* [ ] Did you check the manual for your release? The v2 manual is [here](https://github.com/urfave/cli/blob/master/docs/v2/manual.md).
|
||||||
* [ ] Did you perform a search about this feature? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.
|
* [ ] Did you perform a search about this feature? Here's the [Github guide](https://help.github.com/en/github/managing-your-work-on-github/using-search-to-filter-issues-and-pull-requests) about searching.
|
||||||
|
|
||||||
## What problem does this solve?
|
## What problem does this solve?
|
||||||
|
|
||||||
A clear and concise description of what problem this feature would solve. For example:
|
A clear and concise description of what problem this feature would solve. For example:
|
||||||
|
|
||||||
- needing to type out the full flag name takes a long time, so I would like to suggest adding auto-complete
|
- needing to type out the full flag name takes a long time, so I
|
||||||
- I use (osx, windows, linux) and would like support for (some existing feature) to be extended to my platform
|
would like to suggest adding auto-complete
|
||||||
- the terminal output for a particular error case is confusing, and I think it could be improved
|
- I use (osx, windows, linux) and would like support for (some
|
||||||
|
existing feature) to be extended to my platform
|
||||||
|
- the terminal output for a particular error case is confusing, and
|
||||||
|
I think it could be improved
|
||||||
|
|
||||||
## Solution description
|
## Solution description
|
||||||
|
|
||||||
@ -27,4 +30,5 @@ A detailed description of what you want to happen.
|
|||||||
|
|
||||||
## Describe alternatives you've considered
|
## Describe alternatives you've considered
|
||||||
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
A clear and concise description of any alternative solutions or
|
||||||
|
features you've considered.
|
||||||
|
13
.github/pull_request_template.md
vendored
13
.github/pull_request_template.md
vendored
@ -8,10 +8,14 @@
|
|||||||
|
|
||||||
_(REQUIRED)_
|
_(REQUIRED)_
|
||||||
|
|
||||||
- [ ] bug
|
<!--
|
||||||
- [ ] cleanup
|
Delete any of the following that do not apply:
|
||||||
- [ ] documentation
|
-->
|
||||||
- [ ] feature
|
|
||||||
|
- bug
|
||||||
|
- cleanup
|
||||||
|
- documentation
|
||||||
|
- feature
|
||||||
|
|
||||||
## What this PR does / why we need it:
|
## What this PR does / why we need it:
|
||||||
|
|
||||||
@ -28,6 +32,7 @@ _(REQUIRED)_
|
|||||||
## Which issue(s) this PR fixes:
|
## Which issue(s) this PR fixes:
|
||||||
|
|
||||||
_(REQUIRED)_
|
_(REQUIRED)_
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
If this PR fixes one of more issues, list them here.
|
If this PR fixes one of more issues, list them here.
|
||||||
One line each, like so:
|
One line each, like so:
|
||||||
|
17
.github/stale.yml
vendored
Normal file
17
.github/stale.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 365
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 90
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- pinned
|
||||||
|
- security
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: wontfix
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. It will be closed if no further activity occurs. Thank you
|
||||||
|
for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: false
|
71
.github/workflows/cli.yml
vendored
71
.github/workflows/cli.yml
vendored
@ -4,40 +4,34 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- v1
|
tags:
|
||||||
|
- v2.*
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- v1
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
go: [1.15, 1.16, 1.17]
|
go: [1.16.x, 1.17.x, 1.18.x]
|
||||||
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
|
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go ${{ matrix.go }}
|
- name: Set up Go ${{ matrix.go }}
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
- name: Set GOPATH, PATH and ENV
|
- name: Set PATH
|
||||||
run: |
|
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
|
||||||
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
|
|
||||||
echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV
|
|
||||||
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
|
|
||||||
- name: GOFMT Check
|
- name: GOFMT Check
|
||||||
if: matrix.go == 1.17 && matrix.os == 'ubuntu-latest'
|
if: matrix.go == '1.17.x' && matrix.os == 'ubuntu-latest'
|
||||||
run: test -z $(gofmt -l .)
|
run: test -z $(gofmt -l .)
|
||||||
|
|
||||||
- name: vet
|
- name: vet
|
||||||
@ -50,8 +44,8 @@ jobs:
|
|||||||
run: go run internal/build/build.go check-binary-size
|
run: go run internal/build/build.go check-binary-size
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: success() && matrix.go == 1.17 && matrix.os == 'ubuntu-latest'
|
if: success() && matrix.go == '1.17.x' && matrix.os == 'ubuntu-latest'
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v2
|
||||||
with:
|
with:
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
|
||||||
@ -60,43 +54,30 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
# Currently fails on 1.16+
|
go-version: 1.18.x
|
||||||
go-version: 1.15
|
|
||||||
|
|
||||||
- name: Use Node.js 12.x
|
- name: Use Node.js 16
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: '16'
|
||||||
|
|
||||||
- name: Set GOPATH, PATH and ENV
|
- name: Set PATH
|
||||||
run: |
|
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
|
||||||
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
|
|
||||||
echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV
|
|
||||||
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run:
|
||||||
mkdir -p $GOPATH/bin
|
mkdir -p "${GITHUB_WORKSPACE}/.local/bin" &&
|
||||||
curl -L -o $GOPATH/bin/gfmrun "https://github.com/urfave/gfmrun/releases/download/v1.2.14/gfmrun-$(go env GOOS)-amd64-v1.2.14"
|
curl -fsSL -o "${GITHUB_WORKSPACE}/.local/bin/gfmrun" "https://github.com/urfave/gfmrun/releases/download/v1.3.0/gfmrun-$(go env GOOS)-$(go env GOARCH)-v1.3.0" &&
|
||||||
chmod +x $GOPATH/bin/gfmrun
|
chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun" &&
|
||||||
npm install -g markdown-toc@1.2.0
|
npm install -g markdown-toc@1.2.0
|
||||||
|
|
||||||
- name: Run Tests (v1)
|
- name: gfmrun
|
||||||
if: contains(github.base_ref, 'v1')
|
run: go run internal/build/build.go gfmrun docs/v2/manual.md
|
||||||
run: |
|
|
||||||
go run internal/build/build.go gfmrun docs/v1/manual.md
|
|
||||||
go run internal/build/build.go toc docs/v1/manual.md
|
|
||||||
|
|
||||||
- name: Run Tests (v2)
|
- name: toc
|
||||||
if: contains(github.base_ref, 'master')
|
run: go run internal/build/build.go toc docs/v2/manual.md
|
||||||
run: |
|
|
||||||
go run internal/build/build.go gfmrun docs/v2/manual.md
|
|
||||||
go run internal/build/build.go toc docs/v2/manual.md
|
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,5 +5,6 @@ vendor
|
|||||||
.idea
|
.idea
|
||||||
internal/*/built-example
|
internal/*/built-example
|
||||||
coverage.txt
|
coverage.txt
|
||||||
|
/.local/
|
||||||
|
|
||||||
*.exe
|
*.exe
|
||||||
|
@ -674,8 +674,10 @@ Take for example this app that requires the `lang` flag:
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user