File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -143,24 +143,18 @@ func main() {
143143 settings .ProxyUseHostKerberos = true
144144 }
145145
146- if ! (line .IsSet ("d" ) || line .IsSet ("destination" )) && len (settings .Addr ) == 0 && len (line .Arguments ) < 1 {
147- fmt .Println ("No destination specified" )
148- printHelp ()
149- return
150- }
151-
152146 tempDestination , err := line .GetArgString ("d" )
153147 if err != nil {
154148 tempDestination , _ = line .GetArgString ("destination" )
155149 }
156150
157151 if len (tempDestination ) > 0 {
158- destination = tempDestination
152+ settings . Addr = tempDestination
159153 }
160154
161- if len (destination ) == 0 && len (line .Arguments ) > 1 {
155+ if len (settings . Addr ) == 0 && len (line .Arguments ) > 1 {
162156 // Basically take a guess at the arguments we have and take the last one
163- destination = line .Arguments [len (line .Arguments )- 1 ].Value ()
157+ settings . Addr = line .Arguments [len (line .Arguments )- 1 ].Value ()
164158 }
165159
166160 var actualLogLevel logger.Urgency = logger .INFO
@@ -179,7 +173,7 @@ func main() {
179173 }
180174 logger .SetLogLevel (actualLogLevel )
181175
182- if len (destination ) == 0 {
176+ if len (settings . Addr ) == 0 {
183177 fmt .Println ("No destination specified" )
184178 printHelp ()
185179 return
You can’t perform that action at this time.
0 commit comments