You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/31 09:52:56 UTC

[GitHub] [dubbo-go] AlexStocks commented on a diff in pull request #1945: feat: support xds certificate

AlexStocks commented on code in PR #1945:
URL: https://github.com/apache/dubbo-go/pull/1945#discussion_r933959364


##########
xds/credentials/certgenerate/generate_cert.go:
##########
@@ -242,12 +242,12 @@ func GenCertFromCSR(csr *x509.CertificateRequest, signingCert *x509.Certificate,
 //	signerCertFile: cert file name
 //	signerPrivFile: private key file name
 func LoadSignerCredsFromFiles(signerCertFile string, signerPrivFile string) (*x509.Certificate, crypto.PrivateKey, error) {
-	signerCertBytes, err := os.ReadFile(signerCertFile)
+	signerCertBytes, err := ioutil.ReadFile(signerCertFile)

Review Comment:
   改下包名称,为何?当然我也知道go一些历史原因,导致两个包重复实现了这些函数,但是 ioutil 这个实现的优点在哪?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org