mirror of
https://github.com/halverneus/static-file-server.git
synced 2024-11-12 21:45:29 +00:00
25 lines
502 B
Go
25 lines
502 B
Go
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()
|
|
)
|