mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-06 19:07:50 +00:00
get rid of init
This commit is contained in:
parent
04c7ab5034
commit
b7973b75f1
1 changed files with 6 additions and 4 deletions
|
|
@ -36,17 +36,19 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
TempDir *string
|
||||
TempDir = getTempDirString()
|
||||
)
|
||||
|
||||
func init() { // nolint: gochecknoinits
|
||||
func getTempDirString() (td *string) {
|
||||
tdflag := flag.Lookup("temp-dir")
|
||||
|
||||
if tdflag == nil {
|
||||
TempDir = flag.String("temp-dir", "", "Directory in which to place temporary data (e.g. for benchmarking). Useful if you are trying to benchmark different storage configurations.")
|
||||
td = flag.String("temp-dir", "", "Directory in which to place temporary data (e.g. for benchmarking). Useful if you are trying to benchmark different storage configurations.")
|
||||
} else {
|
||||
s := tdflag.Value.String()
|
||||
TempDir = &s
|
||||
td = &s
|
||||
}
|
||||
return td
|
||||
}
|
||||
|
||||
// Ensure a row query can be executed.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue