Skip to content

Commit 5309d93

Browse files
author
Roberto Sora
committed
remove unused runDaemonCommand in daemon
1 parent 4df5215 commit 5309d93

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

daemon/daemon.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import (
2323
"context"
2424
"fmt"
2525
"io"
26-
"log"
27-
"net"
2826
"net/http"
2927

3028
"github.com/arduino/arduino-cli/cli"
@@ -35,29 +33,8 @@ import (
3533
"github.com/arduino/arduino-cli/commands/lib"
3634
"github.com/arduino/arduino-cli/commands/upload"
3735
"github.com/arduino/arduino-cli/rpc"
38-
"github.com/spf13/cobra"
39-
"google.golang.org/grpc"
4036
)
4137

42-
const (
43-
port = ":50051"
44-
)
45-
46-
func runDaemonCommand(cmd *cobra.Command, args []string) {
47-
lis, err := net.Listen("tcp", port)
48-
if err != nil {
49-
log.Fatalf("failed to listen: %v", err)
50-
}
51-
s := grpc.NewServer()
52-
rpc.RegisterArduinoCoreServer(s, &ArduinoCoreServerImpl{
53-
downloaderHeaders: http.Header{},
54-
})
55-
if err := s.Serve(lis); err != nil {
56-
log.Fatalf("failed to serve: %v", err)
57-
}
58-
fmt.Println("Done serving")
59-
}
60-
6138
type ArduinoCoreServerImpl struct {
6239
downloaderHeaders http.Header
6340
}

0 commit comments

Comments
 (0)