mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 03:19:36 +03:00
Style: format code by gofumpt (#761)
This commit is contained in:
@ -73,6 +73,7 @@ func printJSON(certificate *Certificate) {
|
||||
os.Stdout.Write(content)
|
||||
os.Stdout.WriteString("\n")
|
||||
}
|
||||
|
||||
func printFile(certificate *Certificate, name string) error {
|
||||
certPEM, keyPEM := certificate.ToPEM()
|
||||
return task.Run(context.Background(), func() error {
|
||||
@ -81,6 +82,7 @@ func printFile(certificate *Certificate, name string) error {
|
||||
return writeFile(keyPEM, name+"_key.pem")
|
||||
})
|
||||
}
|
||||
|
||||
func writeFile(content []byte, name string) error {
|
||||
f, err := os.Create(name)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user