You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: main.go
+54-39
Original file line number
Diff line number
Diff line change
@@ -14,69 +14,84 @@ import (
14
14
"github.com/arduino/go-paths-helper"
15
15
)
16
16
17
-
varclangdPathstring
18
-
varcompileCommandsDirstring
19
-
varcliPathstring
20
-
varcliConfigPathstring
21
-
varinitialFqbnstring
22
-
varinitialBoardNamestring
23
-
varenableLoggingbool
24
-
varloggingBasePathstring
25
-
varformatFilePathstring
26
-
27
17
funcmain() {
28
-
flag.StringVar(&clangdPath, "clangd", "clangd", "Path to clangd executable")
29
-
flag.StringVar(&compileCommandsDir, "compile-commands-dir", "", "Specify a path to look for compile_commands.json. If path is invalid, clangd will look in the current directory and parent paths of each source file. If not specified, the clangd process is started without the compilation database.")
30
-
flag.StringVar(&cliPath, "cli", "arduino-cli", "Path to arduino-cli executable")
31
-
flag.StringVar(&cliConfigPath, "cli-config", "", "Path to arduino-cli config file")
32
-
flag.StringVar(&initialFqbn, "fqbn", "arduino:avr:uno", "Fully qualified board name to use initially (can be changed via JSON-RPC)")
33
-
flag.StringVar(&initialBoardName, "board-name", "", "User-friendly board name to use initially (can be changed via JSON-RPC)")
34
-
flag.BoolVar(&enableLogging, "log", false, "Enable logging to files")
35
-
flag.StringVar(&loggingBasePath, "logpath", ".", "Location where to write logging files to when logging is enabled")
36
-
flag.StringVar(&formatFilePath, "format-conf-path", "", "Path to global clang-format configuration file")
18
+
clangdPath:=flag.String(
19
+
"clangd", "",
20
+
"Path to clangd executable")
21
+
cliPath:=flag.String(
22
+
"cli", "",
23
+
"Path to arduino-cli executable")
24
+
cliConfigPath:=flag.String(
25
+
"cli-config", "",
26
+
"Path to arduino-cli config file")
27
+
fqbn:=flag.String(
28
+
"fqbn", "",
29
+
"Fully qualified board name to use initially (can be changed via JSON-RPC)")
30
+
/* unused */_=flag.String(
31
+
"board-name", "",
32
+
"User-friendly board name to use initially (can be changed via JSON-RPC)")
33
+
enableLogging:=flag.Bool(
34
+
"log", false,
35
+
"Enable logging to files")
36
+
loggingBasePath:=flag.String(
37
+
"logpath", ".",
38
+
"Location where to write logging files to when logging is enabled")
39
+
formatFilePath:=flag.String(
40
+
"format-conf-path", "",
41
+
"Path to global clang-format configuration file")
42
+
cliDaemonAddress:=flag.String(
43
+
"cli-daemon-addr", "",
44
+
"TCP address and port of the Arduino CLI daemon (for example: localhost:50051)")
0 commit comments