mirror of
https://github.com/halverneus/static-file-server.git
synced 2024-11-12 21:45:29 +00:00
36 lines
629 B
Go
36 lines
629 B
Go
package version
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
// Run print operation.
|
|
func Run() error {
|
|
fmt.Printf("%s\n%s\n", Text, GoVersionText)
|
|
return nil
|
|
}
|
|
|
|
var (
|
|
// MajorVersion of static-file-server.
|
|
MajorVersion = 1
|
|
|
|
// MinorVersion of static-file-server.
|
|
MinorVersion = 4
|
|
|
|
// FixVersion of static-file-server.
|
|
FixVersion = 1
|
|
|
|
// Text for directly accessing the static-file-server version.
|
|
Text = fmt.Sprintf(
|
|
"v%d.%d.%d",
|
|
MajorVersion,
|
|
MinorVersion,
|
|
FixVersion,
|
|
)
|
|
|
|
// GoVersionText for directly accessing the version of the Go runtime
|
|
// compiled with the static-file-server.
|
|
GoVersionText = runtime.Version()
|
|
)
|