Skip to content

Commit

Permalink
add Start Extension method
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Sep 28, 2024
1 parent 3a508b7 commit 0b3e00a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cmd/cmd_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ var commandExtension = &cobra.Command{
Short: "extension configuration",
Args: cobra.MaximumNArgs(2),
Run: func(cmd *cobra.Command, args []string) {
grpc_server, _ := v2.StartCoreGrpcServer("127.0.0.1:12345")
fmt.Printf("Waiting for CTRL+C to stop\n")
runWebserver(grpc_server)
<-time.After(1 * time.Second)
StartExtension()
},
}

func StartExtension() {
grpc_server, _ := v2.StartCoreGrpcServer("127.0.0.1:12345")
fmt.Printf("Waiting for CTRL+C to stop\n")
runWebserver(grpc_server)
<-time.After(1 * time.Second)
}

func init() {
// commandWarp.Flags().StringVarP(&warpKey, "key", "k", "", "warp key")
mainCommand.AddCommand(commandExtension)
Expand Down

0 comments on commit 0b3e00a

Please sign in to comment.