mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 16:15:56 +00:00
use the Build parameter as the Version in handler
Standardize on `Version` for the build version
This commit is contained in:
parent
1e01982884
commit
d25458ac30
3 changed files with 6 additions and 9 deletions
|
|
@ -17,12 +17,12 @@ import (
|
|||
"github.com/pilosa/pilosa"
|
||||
)
|
||||
|
||||
// Build holds the build information passed in at compile time.
|
||||
var Build string
|
||||
// Version holds the version information passed in at compile time.
|
||||
var Version string
|
||||
|
||||
func init() {
|
||||
if Build == "" {
|
||||
Build = "v0.0.0"
|
||||
if Version == "" {
|
||||
Version = "0.0.0"
|
||||
}
|
||||
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
|
|
@ -35,7 +35,8 @@ const (
|
|||
|
||||
func main() {
|
||||
m := NewMain()
|
||||
fmt.Fprintf(m.Stderr, "Pilosa %s\n", Build)
|
||||
m.Server.Handler.Version = Version
|
||||
fmt.Fprintf(m.Stderr, "Pilosa %s\n", Version)
|
||||
|
||||
// Parse command line arguments.
|
||||
if err := m.ParseFlags(os.Args[1:]); err != nil {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ type Handler struct {
|
|||
// NewHandler returns a new instance of Handler with a default logger.
|
||||
func NewHandler() *Handler {
|
||||
return &Handler{
|
||||
Version: Version,
|
||||
LogOutput: os.Stderr,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,9 +23,6 @@ var (
|
|||
ErrQueryRequired = errors.New("query required")
|
||||
)
|
||||
|
||||
// Version represents the current running version of Pilosa.
|
||||
var Version string
|
||||
|
||||
// Profile represents vertical column in a database.
|
||||
// A profile can have a set of attributes attached to it.
|
||||
type Profile struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue