diff --git a/cli/main.go b/cli/main.go index 38ddbb8..8e872cb 100644 --- a/cli/main.go +++ b/cli/main.go @@ -89,13 +89,6 @@ func main() { EnvVars: []string{"IMHASHDB_QUERY_CONCURRENCY"}, Destination: &Conf.QueryConcurrency, }, - &cli.StringFlag{ - Name: "store", - Value: "", - Usage: "If set, store downloaded images there", - EnvVars: []string{"IMHASHDB_STORE"}, - Destination: &Conf.Store, - }, }, }, { @@ -183,6 +176,13 @@ func main() { EnvVars: []string{"IMHASHDB_HASH_CONCURRENCY"}, Destination: &Conf.HasherConcurrency, }, + &cli.StringFlag{ + Name: "store", + Value: "", + Usage: "If set, store downloaded images there", + EnvVars: []string{"IMHASHDB_STORE"}, + Destination: &Conf.Store, + }, }, }, }, diff --git a/hasher/hasher.go b/hasher/hasher.go index b0b7289..22aead7 100644 --- a/hasher/hasher.go +++ b/hasher/hasher.go @@ -144,11 +144,14 @@ func trimUrl(link string) string { return link } -var StoreData = Conf.Store != "" -var DataPath = Conf.Store +var StoreData bool +var DataPath string var Pattern = "imhash.*" func Main() error { + StoreData = Conf.Store != "" + DataPath = Conf.Store + queue := make(chan []string) for i := 0; i < Conf.HasherConcurrency; i++ {