creata una struttura DBS per contenere i puntatori delle connessioni al DB
This commit is contained in:
parent
0de9b415b8
commit
494696c336
4 changed files with 24 additions and 18 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
_VERSION = "v1.1.0"
|
||||
_VERSION = "v1.1.1"
|
||||
_tformat = "2006-01-02"
|
||||
_24h = (time.Hour * 23) + (time.Minute * 59) + (time.Second * 59)
|
||||
_10m = (time.Minute * 10)
|
||||
|
@ -27,6 +27,9 @@ var (
|
|||
Duration: _24h,
|
||||
Interval: _15m,
|
||||
}
|
||||
|
||||
dbs = Dbs{}
|
||||
|
||||
countTOT = 0
|
||||
countOK = 0
|
||||
)
|
||||
|
@ -54,8 +57,8 @@ func main() {
|
|||
log.Printf("Start: %+v\n", opts)
|
||||
|
||||
connectMongo()
|
||||
defer opts.mdbSrc.Close()
|
||||
defer opts.mdbDst.Clone()
|
||||
defer dbs.mdbSrc.Close()
|
||||
defer dbs.mdbDst.Clone()
|
||||
|
||||
y, err := time.Parse(_tformat, opts.StartDate)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue