check if the paths to the certs exists
(cert string, key string)
| 81 | |
| 82 | // check if the paths to the certs exists |
| 83 | func checkPath(cert string, key string) error { |
| 84 | if _, err := os.Stat(cert); err != nil && os.IsNotExist(err) { |
| 85 | return errors.New("path to certificate file does not exists") |
| 86 | } |
| 87 | if _, err := os.Stat(key); err != nil && os.IsNotExist(err) { |
| 88 | return errors.New("path to key file does not exists") |
| 89 | } |
| 90 | return nil |
| 91 | } |