cri-o/vendor/github.com/docker/distribution/version/print.go
Mrunal Patel 8e5b17cf13 Switch to github.com/golang/dep for vendoring
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-01-31 16:45:59 -08:00

26 lines
584 B
Go

package version
import (
"fmt"
"io"
"os"
)
// FprintVersion outputs the version string to the writer, in the following
// format, followed by a newline:
//
// <cmd> <project> <version>
//
// For example, a binary "registry" built from github.com/docker/distribution
// with version "v2.0" would print the following:
//
// registry github.com/docker/distribution v2.0
//
func FprintVersion(w io.Writer) {
fmt.Fprintln(w, os.Args[0], Package, Version)
}
// PrintVersion outputs the version information, from Fprint, to stdout.
func PrintVersion() {
FprintVersion(os.Stdout)
}