style: 补充代码注释

This commit is contained in:
TsMask
2024-06-14 17:01:19 +08:00
parent 4b1acc3e25
commit 1f68c15e93
3 changed files with 4 additions and 3 deletions

View File

@@ -203,6 +203,7 @@ func (s *NeHostController) Test(c *gin.Context) {
return
}
defer client.Close()
// 是否有终止符
if strings.HasSuffix(client.LastResult, ">") || strings.HasSuffix(client.LastResult, "> ") || strings.HasSuffix(client.LastResult, "# ") {
c.JSON(200, result.Ok(nil))
} else {

View File

@@ -174,7 +174,7 @@ func (r *NeLicenseImpl) UploadLicense(neLicense model.NeLicense) error {
// 上传授权文件去覆盖
if err := sftpClient.CopyFileLocalToRemote(omcLicensePath, neLicensePath); err != nil {
return err
return fmt.Errorf("please check if scp remote copy is allowed")
}
// 重启服务