-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: switch to a simplified version of flag
Eventually, I want to write a flag-parsing library of my own. But for now, I can use flag from the standard library. However, to simplify my code, I have removed a lot from flag. Most importantly, this version of flag no longer special cases "-h" or "--help" and it does not display usage.
- Loading branch information
1 parent
52e1406
commit c354d56
Showing
11 changed files
with
789 additions
and
656 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ import ( | |
) | ||
|
||
func main() { | ||
os.Exit(cli.Gitmirror(os.Args)) | ||
os.Exit(cli.Gitmirror(os.Args[1:])) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= | ||
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= | ||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | ||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cli | ||
|
||
import "github.com/MakeNowJust/heredoc" | ||
|
||
var _usage = heredoc.Docf(` | ||
usage: gitmirror [options] <subcommand> [options] | ||
Options | ||
-c, --config=FILE Use FILE as config file (default ~/.gitmirror.json) | ||
-q, --quiet Print only error messages | ||
-h, --help Print this help and exit | ||
--version Print version and exit | ||
Subcommands | ||
clone Clone git repositories using %[1]sgit clone --mirror%[1]s | ||
update|up Update git repositories using %[1]sgit remote update%[1]s | ||
sync Run both update and clone (in that order) | ||
For more information or to file a bug report visit https://github.com/telemachus/gitmirror | ||
`, "`") |
Oops, something went wrong.