Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jingweicb committed Aug 13, 2022
1 parent aa77764 commit a639780
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var (
dataResultFile string
constructionResultFile string
dataDirectory string
allInMemory bool
turnOnMemoryMode bool
tableSize int64

// Config is the populated *configuration.Configuration from
Expand Down Expand Up @@ -270,14 +270,14 @@ default values.`,
&tableSize,
"table-size",
0,
`Table-size configures the TableSize for badger DB. If tableSize != 0, this will override the table_size from configuration file`,
`Table-size configures the TableSize for badger DB. If table-size != 0, this will override the table_size from configuration file`,
)

checkDataCmd.Flags().BoolVar(
&allInMemory,
"all-in-memory",
&turnOnMemoryMode,
"turn-on-memory-mode",
false,
"All-in-memory configures badger DB inMeomry option. This will override the all_in_memory_enabled to true from configuration file",
"turn-on-memory-mode configures badger DB inMeomry option. if turn-on-memory-mode=true This will override the all_in_memory_enabled",
)

rootCmd.AddCommand(checkDataCmd)
Expand Down Expand Up @@ -390,8 +390,8 @@ func initConfig() {
Config.DataDirectory = dataDirectory
}

if allInMemory {
Config.AllInMemoryEnabled = allInMemory
if turnOnMemoryMode {
Config.AllInMemoryEnabled = turnOnMemoryMode
}

if tableSize != 0 {
Expand Down

0 comments on commit a639780

Please sign in to comment.