2018-07-29 00:05:24 +00:00
|
|
|
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 = 3
|
|
|
|
|
|
|
|
// FixVersion of static-file-server.
|
2018-09-05 17:45:06 +00:00
|
|
|
FixVersion = 1
|
2018-07-29 00:05:24 +00:00
|
|
|
|
|
|
|
// Text for directly accessing the static-file-server version.
|
|
|
|
Text = fmt.Sprintf(
|
2018-09-05 17:45:06 +00:00
|
|
|
"v%d.%d.%d",
|
2018-07-29 00:05:24 +00:00
|
|
|
MajorVersion,
|
|
|
|
MinorVersion,
|
|
|
|
FixVersion,
|
|
|
|
)
|
|
|
|
|
|
|
|
// GoVersionText for directly accessing the version of the Go runtime
|
|
|
|
// compiled with the static-file-server.
|
|
|
|
GoVersionText = runtime.Version()
|
|
|
|
)
|