You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package version
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Run print operation.
|
|
|
|
func Run() error {
|
|
|
|
fmt.Printf("%s\n%s\n", VersionText, GoVersionText)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
|
|
|
// version is the application version set during build.
|
|
|
|
version string
|
|
|
|
|
|
|
|
// VersionText for directly accessing the static-file-server version.
|
|
|
|
VersionText = fmt.Sprintf("v%s", version)
|
|
|
|
|
|
|
|
// GoVersionText for directly accessing the version of the Go runtime
|
|
|
|
// compiled with the static-file-server.
|
|
|
|
GoVersionText = runtime.Version()
|
|
|
|
)
|