Skip to content

Commit f344681

Browse files
committed
Update for compatibility with the latest version of ek package
1 parent e4e2a0a commit f344681

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

cli/cli.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636

3737
const (
3838
APP = "SSLScan Client"
39-
VER = "2.7.1"
39+
VER = "2.7.2"
4040
DESC = "Command-line client for the SSL Labs API"
4141
)
4242

@@ -193,12 +193,10 @@ func prepare() {
193193
}
194194

195195
// process starting request processing
196-
func process(args []string) {
197-
var (
198-
ok bool
199-
err error
200-
hosts []string
201-
)
196+
func process(args options.Arguments) {
197+
var ok bool
198+
var err error
199+
var hosts []string
202200

203201
api, err = sslscan.NewAPI("SSLCli", VER)
204202

@@ -210,17 +208,17 @@ func process(args []string) {
210208
os.Exit(1)
211209
}
212210

213-
// By default all fine
214-
ok = true
215-
hosts = args
211+
ok = true // By default everything is fine
216212

217-
if fsutil.CheckPerms("FR", hosts[0]) {
218-
hosts, err = readHostList(hosts[0])
213+
if fsutil.CheckPerms("FR", args.Get(0).String()) {
214+
hosts, err = readHostList(args.Get(0).String())
219215

220216
if err != nil && options.GetB(OPT_FORMAT) {
221217
printError(err.Error())
222218
os.Exit(1)
223219
}
220+
} else {
221+
hosts = args.Strings()
224222
}
225223

226224
var grade string

0 commit comments

Comments
 (0)