mirror of https://github.com/v2ray/v2ray-core
code quality review
parent
9e84ce38dd
commit
49b63cbd79
|
@ -44,7 +44,7 @@ func generate(domainNames []string, isCA bool, jsonOutput bool, fileOutput strin
|
||||||
}
|
}
|
||||||
|
|
||||||
if jsonOutput {
|
if jsonOutput {
|
||||||
printJson(cert)
|
printJSON(cert)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(fileOutput) > 0 {
|
if len(fileOutput) > 0 {
|
||||||
|
@ -61,7 +61,7 @@ type jsonCert struct {
|
||||||
Key []string `json:"key"`
|
Key []string `json:"key"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func printJson(certificate *Certificate) {
|
func printJSON(certificate *Certificate) {
|
||||||
certPEM, keyPEM := certificate.ToPEM()
|
certPEM, keyPEM := certificate.ToPEM()
|
||||||
jCert := &jsonCert{
|
jCert := &jsonCert{
|
||||||
Certificate: strings.Split(strings.TrimSpace(string(certPEM)), "\n"),
|
Certificate: strings.Split(strings.TrimSpace(string(certPEM)), "\n"),
|
||||||
|
|
Loading…
Reference in New Issue