From c75a689f629137700e8a30651f95cc41cf12a6d1 Mon Sep 17 00:00:00 2001 From: Jordan Christiansen Date: Fri, 2 Aug 2019 14:28:57 -0500 Subject: [PATCH 1/3] Make exit code example more clear The purpose of this example is to show that you can exit with an error code if a flag is unspecified, but with the code as it is, the only way to cause a non-zero exit is by adding the flag `--ginger-crouton=false`, which is not explained in the example. In this new version of the example, running the command with no flag will exit with an error, and running it with the flag will exit normally. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6eb2996..0a9cd32 100644 --- a/README.md +++ b/README.md @@ -901,14 +901,14 @@ import ( func main() { app := cli.NewApp() app.Flags = []cli.Flag{ - cli.BoolTFlag{ + cli.BoolFlag{ Name: "ginger-crouton", - Usage: "is it in the soup?", + Usage: "Add ginger croutons to the soup", }, } app.Action = func(ctx *cli.Context) error { if !ctx.Bool("ginger-crouton") { - return cli.NewExitError("it is not in the soup", 86) + return cli.NewExitError("Ginger croutons are not in the soup", 86) } return nil } From 97dbddb32db290fdc6392e6a669a92acbadef9ff Mon Sep 17 00:00:00 2001 From: "[[ BOT ]] Lynn Cyrin" Date: Sat, 3 Aug 2019 10:23:29 -0700 Subject: [PATCH 2/3] use codeowners instead of maintainers --- .github/CODEOWNERS | 4 ++++ MAINTAINERS.md | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 .github/CODEOWNERS delete mode 100644 MAINTAINERS.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..4f138e8 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,4 @@ +# See https://help.github.com/articles/about-codeowners/ +# for more info about CODEOWNERS file + +* @urfave/cli diff --git a/MAINTAINERS.md b/MAINTAINERS.md deleted file mode 100644 index 5b7a6ea..0000000 --- a/MAINTAINERS.md +++ /dev/null @@ -1,4 +0,0 @@ -- @meatballhat -- @lynncyrin -- @AudriusButkevicius -- @asahasrabuddhe From 9938dec695d6a0ba5a4d84b703766333cd7d10e8 Mon Sep 17 00:00:00 2001 From: "[[ BOT ]] Lynn Cyrin" Date: Sat, 3 Aug 2019 10:26:07 -0700 Subject: [PATCH 3/3] update contributing docs --- CONTRIBUTING.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 329195e..9a4640a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,10 @@ ## Contributing -**NOTE**: the primary maintainer(s) may be found in -[./MAINTAINERS.md](./MAINTAINERS.md). +Use @urfave/cli to ping the maintainers. -Feel free to put up a pull request to fix a bug or maybe add a feature. I will +Feel free to put up a pull request to fix a bug or maybe add a feature. We will give it a code review and make sure that it does not break backwards -compatibility. If I or any other collaborators agree that it is in line with +compatibility. If collaborators agree that it is in line with the vision of the project, we will work with you to get the code into a mergeable state and merge it into the master branch. @@ -15,5 +14,5 @@ to merge others pull requests. It is very important that new code does not break existing code, so be careful about what code you do choose to merge. If you feel like you have contributed to the project but have not yet been added -as a collaborator, we probably forgot to add you :sweat_smile:. Please open an +as a collaborator, we probably forgot to add you :sweat_smile:. Please open an issue!