MCPcopy Index your code
hub / github.com/rclone/rclone / ShowVersion

Function ShowVersion

cmd/cmd.go:58–79  ·  view source on GitHub ↗

ShowVersion prints the version to stdout

()

Source from the content-addressed store, hash-verified

56
57// ShowVersion prints the version to stdout
58func 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//

Callers 2

version.goFile · 0.92
runRootFunction · 0.85

Calls 4

GetOSVersionFunction · 0.92
GetLinkingAndTagsFunction · 0.92
GetArchFunction · 0.92
PrintfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…