ShowVersion prints the version to stdout
()
| 56 | |
| 57 | // ShowVersion prints the version to stdout |
| 58 | func ShowVersion() { |
| 59 | osVersion, osKernel := buildinfo.GetOSVersion() |
| 60 | if osVersion == "" { |
| 61 | osVersion = "unknown" |
| 62 | } |
| 63 | if osKernel == "" { |
| 64 | osKernel = "unknown" |
| 65 | } |
| 66 | |
| 67 | linking, tagString := buildinfo.GetLinkingAndTags() |
| 68 | |
| 69 | arch := buildinfo.GetArch() |
| 70 | |
| 71 | fmt.Printf("rclone %s\n", fs.Version) |
| 72 | fmt.Printf("- os/version: %s\n", osVersion) |
| 73 | fmt.Printf("- os/kernel: %s\n", osKernel) |
| 74 | fmt.Printf("- os/type: %s\n", runtime.GOOS) |
| 75 | fmt.Printf("- os/arch: %s\n", arch) |
| 76 | fmt.Printf("- go/version: %s\n", runtime.Version()) |
| 77 | fmt.Printf("- go/linking: %s\n", linking) |
| 78 | fmt.Printf("- go/tags: %s\n", tagString) |
| 79 | } |
| 80 | |
| 81 | // NewFsFile creates an Fs from a name but may point to a file. |
| 82 | // |
no test coverage detected
searching dependent graphs…