feat(cli): add register command basic functions

This commit is contained in:
fuxiaohei
2022-11-15 20:46:29 +08:00
committed by Jason Song
parent 88ae188699
commit 561bfad7c5
2 changed files with 48 additions and 9 deletions

23
cmd/register.go Normal file
View File

@ -0,0 +1,23 @@
package cmd
import (
"context"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
// runRegister registers a runner to the server
func runRegister(ctx context.Context, regArgs *registerArgs) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, args []string) error {
log.Infoln("Starting register to gitea instance")
return nil
}
}
// registerArgs represents the arguments for register command
type registerArgs struct {
NoInteractive bool
InstanceAddr string
Token string
}