Fix ocsp/helper. (#5104)

In #5103 I tweaked the help to allow customizing where the output goes,
but I didn't ensure that the output field was always set. Also, I forgot
to expand the `...v` parameter when passing it to Fprintf.
This commit is contained in:
Jacob Hoffman-Andrews 2020-09-28 08:39:06 -07:00 committed by GitHub
parent d90a2817c4
commit ec7b5f2b80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -71,6 +71,7 @@ func ConfigFromFlags() Config {
ignoreExpiredCerts: *ignoreExpiredCerts,
expectStatus: *expectStatus,
expectReason: *expectReason,
output: os.Stdout,
}
}
@ -330,7 +331,7 @@ func parseAndPrint(respBytes []byte, cert, issuer *x509.Certificate, config Conf
}
pr := func(s string, v ...interface{}) {
fmt.Fprintf(config.output, s, v)
fmt.Fprintf(config.output, s, v...)
}
pr("\n")