Skip to content

Commit 2133d40

Browse files
committedJul 26, 2018
Move proxy flags in iniflags
1 parent 4fe0cdf commit 2133d40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ var (
3333
port string
3434
portSSL string
3535
requiredToolsAPILevel = "v1"
36-
httpProxy = flag.String("httpProxy", "", "Proxy server for HTTP requests")
37-
httpsProxy = flag.String("httpsProxy", "", "Proxy server for HTTPS requests")
3836
)
3937

4038
// regular flags
@@ -47,12 +45,14 @@ var (
4745

4846
// iniflags
4947
var (
50-
iniConf = flag.NewFlagSet("ini", flag.ContinueOnError)
5148
address = iniConf.String("address", "127.0.0.1", "The address where to listen. Defaults to localhost")
5249
appName = iniConf.String("appName", "", "")
5350
gcType = iniConf.String("gc", "std", "Type of garbage collection. std = Normal garbage collection allowing system to decide (this has been known to cause a stop the world in the middle of a CNC job which can cause lost responses from the CNC controller and thus stalled jobs. use max instead to solve.), off = let memory grow unbounded (you have to send in the gc command manually to garbage collect or you will run out of RAM eventually), max = Force garbage collection on each recv or send on a serial port (this minimizes stop the world events and thus lost serial responses, but increases CPU usage)")
5451
hostname = iniConf.String("hostname", "unknown-hostname", "Override the hostname we get from the OS")
52+
httpProxy = iniConf.String("httpProxy", "", "Proxy server for HTTP requests")
53+
httpsProxy = iniConf.String("httpsProxy", "", "Proxy server for HTTPS requests")
5554
indexURL = iniConf.String("indexURL", "https://downloads.arduino.cc/packages/package_staging_index.json", "The address from where to download the index json containing the location of upload tools")
55+
iniConf = flag.NewFlagSet("ini", flag.ContinueOnError)
5656
logDump = iniConf.String("log", "off", "off = (default)")
5757
origins = iniConf.String("origins", "", "Allowed origin list for CORS")
5858
regExpFilter = iniConf.String("regex", "usb|acm|com", "Regular expression to filter serial port list")

0 commit comments

Comments
 (0)