mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-07 19:30:22 -05:00
dolt/go: store/types/format: Respond to PR feedback.
This commit is contained in:
@@ -5,10 +5,22 @@
|
||||
// Package constants collects common constants used in Noms, such as the Noms data format version.
|
||||
package constants
|
||||
|
||||
import "os"
|
||||
|
||||
func init() {
|
||||
nbfVerStr := os.Getenv("DOLT_DEFAULT_BIN_FORMAT")
|
||||
if nbfVerStr != "" {
|
||||
FormatDefaultString = nbfVerStr
|
||||
}
|
||||
}
|
||||
|
||||
const NomsVersion = "7.18"
|
||||
|
||||
var NomsGitSHA = "<developer build>"
|
||||
|
||||
// See //go/store/types/format.go for corresponding formats.
|
||||
|
||||
const Format718String = "7.18"
|
||||
const FormatLD1String = "__LD_1__"
|
||||
const FormatDefaultString = "7.18"
|
||||
|
||||
var FormatDefaultString = Format718String
|
||||
|
||||
+13
-15
@@ -1,8 +1,18 @@
|
||||
package types
|
||||
|
||||
import "errors"
|
||||
import "os"
|
||||
import "github.com/liquidata-inc/ld/dolt/go/store/constants"
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/liquidata-inc/ld/dolt/go/store/constants"
|
||||
)
|
||||
|
||||
func init() {
|
||||
nbf, err := GetFormatForVersionString(constants.FormatDefaultString)
|
||||
if err != nil {
|
||||
panic("unrecognized value for DOLT_DEFAULT_BIN_FORMAT " + constants.FormatDefaultString)
|
||||
}
|
||||
Format_Default = nbf
|
||||
}
|
||||
|
||||
type NomsBinFormat struct {
|
||||
tag *formatTag
|
||||
@@ -41,15 +51,3 @@ func (nbf *NomsBinFormat) VersionString() string {
|
||||
panic("unrecognized NomsBinFormat tag value")
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
nbfVerStr := os.Getenv("DOLT_DEFAULT_BIN_FORMAT")
|
||||
if nbfVerStr == "" {
|
||||
nbfVerStr = constants.FormatDefaultString
|
||||
}
|
||||
nbf, err := GetFormatForVersionString(nbfVerStr)
|
||||
if err != nil {
|
||||
panic("unrecognized value for DOLT_DEFAULT_BIN_FORMAT " + nbfVerStr)
|
||||
}
|
||||
Format_Default = nbf
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user