Added structure for Search Commands

This commit is contained in:
netbenix 2021-10-30 18:34:24 +02:00
parent 7ff62e1a06
commit aad0ce2c4e
2 changed files with 28 additions and 0 deletions

27
Commands/SearchCommand.go Normal file
View file

@ -0,0 +1,27 @@
package Commands
import (
"fmt"
"github.com/urfave/cli/v2"
"log"
)
func SearchCommand() *cli.Command{
return &cli.Command {
Name: "search",
Usage: "Seaches a packages",
Description: "Sends a search request to the default registry server, or to a user-defined registry server",
HelpName: "search",
Action: func(c *cli.Context) error{
//Do Stuff
return nil
},
OnUsageError: func(c *cli.Context, err error, isSubcommand bool) error {
if err != nil {
fmt.Printf("[ERROR]%s", err.Error())
log.Fatal(err)
}
return err
},
}
}