platformAbsPath constructs an absolute path that is valid on the current platform. On Windows, paths must include a drive letter to be considered absolute.
(parts ...string)
| 23 | // on the current platform. On Windows, paths must include a |
| 24 | // drive letter to be considered absolute. |
| 25 | func platformAbsPath(parts ...string) string { |
| 26 | if runtime.GOOS == "windows" { |
| 27 | return `C:\` + filepath.Join(parts...) |
| 28 | } |
| 29 | return "/" + filepath.Join(parts...) |
| 30 | } |
| 31 | |
| 32 | // TestReportConnectionEmpty tests that reportConnection() doesn't choke if given an empty IP string, which is what we |
| 33 | // send if we cannot get the remote address. |
no outgoing calls
no test coverage detected