(file string)
| 76 | } |
| 77 | |
| 78 | func checkFile(file string) { |
| 79 | if _, err := os.Stat(file); err != nil { |
| 80 | if os.IsPermission(err) { |
| 81 | log.Fatalf("Unable to read file [%s], please check permissions", file) |
| 82 | } else if os.IsNotExist(err) { |
| 83 | log.Fatalf("File [%s], does not exist", file) |
| 84 | } else { |
| 85 | log.Fatalf("Unable to stat file [%s]: %v", file, err) |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | func uploadFile(c *govmomi.Client, newVM vmConfig, dss *object.Datastore) { |
| 91 | _, fileName := path.Split(*newVM.path) |
no outgoing calls
no test coverage detected