mirror of
https://github.com/grdl/git-get.git
synced 2026-03-23 15:25:08 +00:00
Fix issues found by revive linter
This commit is contained in:
@@ -45,7 +45,7 @@ func newGetCommand() *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func runGetCommand(cmd *cobra.Command, args []string) error {
|
||||
func runGetCommand(_ *cobra.Command, args []string) error {
|
||||
var url string
|
||||
if len(args) > 0 {
|
||||
url = args[0]
|
||||
|
||||
@@ -35,7 +35,7 @@ func newListCommand() *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func runListCommand(cmd *cobra.Command, args []string) error {
|
||||
func runListCommand(_ *cobra.Command, _ []string) error {
|
||||
cfg.Expand(cfg.KeyReposRoot)
|
||||
|
||||
config := &pkg.ListCfg{
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// This program behaves as a git subcommand (see https://git.github.io/htmldocs/howto/new-command.html)
|
||||
// When added to PATH, git recognizes it as its subcommand and it can be invoked as "git get..." or "git list..."
|
||||
// It can also be invoked as a regular binary with subcommands: "git-get get..." or "git-get list"
|
||||
// The following flow detects the invokation method and runs the appropriate command.
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -6,11 +10,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// This program behaves as a git subcommand (see https://git.github.io/htmldocs/howto/new-command.html)
|
||||
// When added to PATH, git recognizes it as its subcommand and it can be invoked as "git get..." or "git list..."
|
||||
// It can also be invoked as a regular binary with subcommands: "git-get get..." or "git-get list"
|
||||
// The following flow detects the invokation method and runs the appropriate command.
|
||||
|
||||
func main() {
|
||||
command, args := determineCommand()
|
||||
executeCommand(command, args)
|
||||
|
||||
Reference in New Issue
Block a user