()
| 1544 | } |
| 1545 | |
| 1546 | func loadServiceName() (string, error) { |
| 1547 | if exist, _ := controller.CheckExist("sshd"); exist { |
| 1548 | return "sshd", nil |
| 1549 | } else if exist, _ := controller.CheckExist("ssh"); exist { |
| 1550 | return "ssh", nil |
| 1551 | } |
| 1552 | return "", errors.New("The ssh or sshd service is unavailable") |
| 1553 | } |
| 1554 | |
| 1555 | func loadDate(currentYear int, DateStr string, nyc *time.Location) time.Time { |
| 1556 | itemDate, err := time.ParseInLocation("2006 Jan 2 15:04:05", fmt.Sprintf("%d %s", currentYear, DateStr), nyc) |
no test coverage detected