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
|
||||
about: ask us question - assume stackoverflow's guidelines apply here
|
||||
title: 'q: ( your question title goes here )'
|
||||
about: ask a question - assume stackoverflow's guidelines apply here
|
||||
title: your question title goes here
|
||||
labels: 'kind/question, status/triage, area/v2'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## my question is...
|
||||
|
||||
_**( Put the question text here )**_
|
||||
my question is...
|
||||
|
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
|
||||
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'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## my urfave/cli version is
|
||||
## My urfave/cli version is
|
||||
|
||||
_**( Put the version of urfave/cli that you are using here )**_
|
||||
|
||||
## Checklist
|
||||
|
||||
* [ ] 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 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.
|
||||
- [ ] 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 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
|
||||
|
||||
- [ ] 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.
|
||||
<!--
|
||||
Delete any of the following that do not apply:
|
||||
-->
|
||||
|
||||
- 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
|
||||
|
||||
@ -34,23 +38,30 @@ Describe the steps or code required to reproduce the 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
|
||||
|
||||
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
|
||||
|
||||
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?
|
||||
|
||||
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
|
||||
|
||||
|
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
|
||||
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'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## my urfave/cli version is
|
||||
## My urfave/cli version is
|
||||
|
||||
_**( Put the version of urfave/cli that you are using here )**_
|
||||
|
||||
## Checklist
|
||||
|
||||
* [ ] 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 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.
|
||||
- [ ] 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 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
|
||||
|
||||
- [ ] 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.
|
||||
<!--
|
||||
Delete any of the following that do not apply:
|
||||
-->
|
||||
|
||||
- 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
|
||||
|
||||
@ -34,23 +38,30 @@ Describe the steps or code required to reproduce the 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
|
||||
|
||||
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
|
||||
|
||||
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?
|
||||
|
||||
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
|
||||
|
||||
```
|
||||
|
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
|
||||
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'
|
||||
assignees: ''
|
||||
|
||||
@ -10,16 +10,19 @@ assignees: ''
|
||||
## Checklist
|
||||
|
||||
* [ ] 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.
|
||||
|
||||
## What problem does this solve?
|
||||
|
||||
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
|
||||
- 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
|
||||
- needing to type out the full flag name takes a long time, so I
|
||||
would like to suggest adding auto-complete
|
||||
- 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
|
||||
|
||||
@ -27,4 +30,5 @@ A detailed description of what you want to happen.
|
||||
|
||||
## 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)_
|
||||
|
||||
- [ ] bug
|
||||
- [ ] cleanup
|
||||
- [ ] documentation
|
||||
- [ ] feature
|
||||
<!--
|
||||
Delete any of the following that do not apply:
|
||||
-->
|
||||
|
||||
- bug
|
||||
- cleanup
|
||||
- documentation
|
||||
- feature
|
||||
|
||||
## What this PR does / why we need it:
|
||||
|
||||
@ -28,6 +32,7 @@ _(REQUIRED)_
|
||||
## Which issue(s) this PR fixes:
|
||||
|
||||
_(REQUIRED)_
|
||||
|
||||
<!--
|
||||
If this PR fixes one of more issues, list them here.
|
||||
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:
|
||||
branches:
|
||||
- master
|
||||
- v1
|
||||
tags:
|
||||
- v2.*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- v1
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
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 }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v1
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Set GOPATH, PATH and ENV
|
||||
run: |
|
||||
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: Set PATH
|
||||
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- 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 .)
|
||||
|
||||
- name: vet
|
||||
@ -50,8 +44,8 @@ jobs:
|
||||
run: go run internal/build/build.go check-binary-size
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
if: success() && matrix.go == 1.17 && matrix.os == 'ubuntu-latest'
|
||||
uses: codecov/codecov-action@v1
|
||||
if: success() && matrix.go == '1.17.x' && matrix.os == 'ubuntu-latest'
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
||||
@ -60,43 +54,30 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
# Currently fails on 1.16+
|
||||
go-version: 1.15
|
||||
go-version: 1.18.x
|
||||
|
||||
- name: Use Node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 12.x
|
||||
node-version: '16'
|
||||
|
||||
- name: Set GOPATH, PATH and ENV
|
||||
run: |
|
||||
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: Set PATH
|
||||
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
mkdir -p $GOPATH/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"
|
||||
chmod +x $GOPATH/bin/gfmrun
|
||||
run:
|
||||
mkdir -p "${GITHUB_WORKSPACE}/.local/bin" &&
|
||||
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 "${GITHUB_WORKSPACE}/.local/bin/gfmrun" &&
|
||||
npm install -g markdown-toc@1.2.0
|
||||
|
||||
- name: Run Tests (v1)
|
||||
if: contains(github.base_ref, 'v1')
|
||||
run: |
|
||||
go run internal/build/build.go gfmrun docs/v1/manual.md
|
||||
go run internal/build/build.go toc docs/v1/manual.md
|
||||
- name: gfmrun
|
||||
run: go run internal/build/build.go gfmrun docs/v2/manual.md
|
||||
|
||||
- name: Run Tests (v2)
|
||||
if: contains(github.base_ref, 'master')
|
||||
run: |
|
||||
go run internal/build/build.go gfmrun docs/v2/manual.md
|
||||
go run internal/build/build.go toc docs/v2/manual.md
|
||||
- name: toc
|
||||
run: go run internal/build/build.go toc docs/v2/manual.md
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,5 +5,6 @@ vendor
|
||||
.idea
|
||||
internal/*/built-example
|
||||
coverage.txt
|
||||
/.local/
|
||||
|
||||
*.exe
|
||||
|
@ -674,8 +674,10 @@ Take for example this app that requires the `lang` flag:
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user