MCPcopy Create free account
hub / github.com/drosoCode/atvremote / checkPath

Function checkPath

cmd/flags.go:83–91  ·  view source on GitHub ↗

check if the paths to the certs exists

(cert string, key string)

Source from the content-addressed store, hash-verified

81
82// check if the paths to the certs exists
83func 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}

Callers 1

parseFlagsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected