mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-12-24 09:10:17 +01:00
Silence a few golint warnings.
This commit is contained in:
parent
f80d9e452c
commit
9d1b0cc7c6
@ -38,7 +38,7 @@ func main() {
|
|||||||
cacheSize int
|
cacheSize int
|
||||||
version bool
|
version bool
|
||||||
interleaved bool
|
interleaved bool
|
||||||
changeUrl string
|
changeURL string
|
||||||
gcDuration string
|
gcDuration string
|
||||||
changeDuration string
|
changeDuration string
|
||||||
maxBulkStringSize int64
|
maxBulkStringSize int64
|
||||||
@ -57,7 +57,7 @@ func main() {
|
|||||||
"gc-duration", GCDuration, "Duration between forced GCs.")
|
"gc-duration", GCDuration, "Duration between forced GCs.")
|
||||||
flag.StringVar(&changeDuration,
|
flag.StringVar(&changeDuration,
|
||||||
"change-duration", ChangeDuration, "Duration to aggregate changes.")
|
"change-duration", ChangeDuration, "Duration to aggregate changes.")
|
||||||
flag.StringVar(&changeUrl, "change-url", "", "URL to send changes to.")
|
flag.StringVar(&changeURL, "change-url", "", "URL to send changes to.")
|
||||||
flag.Int64Var(&maxBulkStringSize, "max-bulk-string-size", defaultMaxBulkStringSize,
|
flag.Int64Var(&maxBulkStringSize, "max-bulk-string-size", defaultMaxBulkStringSize,
|
||||||
"max size of a bulk string to be accepted as input (in bytes).")
|
"max size of a bulk string to be accepted as input (in bytes).")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
@ -87,7 +87,7 @@ func main() {
|
|||||||
|
|
||||||
var changeChan <-chan time.Time
|
var changeChan <-chan time.Time
|
||||||
|
|
||||||
useChangeNotification := changeUrl != ""
|
useChangeNotification := changeURL != ""
|
||||||
|
|
||||||
if useChangeNotification {
|
if useChangeNotification {
|
||||||
if chDur, err = time.ParseDuration(changeDuration); err != nil {
|
if chDur, err = time.ParseDuration(changeDuration); err != nil {
|
||||||
@ -162,7 +162,7 @@ func main() {
|
|||||||
log.Println("Garbage collection done.")
|
log.Println("Garbage collection done.")
|
||||||
case <-changeChan:
|
case <-changeChan:
|
||||||
if changeTracker != nil {
|
if changeTracker != nil {
|
||||||
changeTracker.FlushChanges(changeUrl)
|
changeTracker.FlushChanges(changeURL)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,8 @@ type SqliteSession struct {
|
|||||||
tx *sql.Tx
|
tx *sql.Tx
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ss *SqliteBackend) NewSession() (Session, error) {
|
func (sqlb *SqliteBackend) NewSession() (Session, error) {
|
||||||
return &SqliteSession{ss, nil}, nil
|
return &SqliteSession{sqlb, nil}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ss *SqliteSession) Close() error {
|
func (ss *SqliteSession) Close() error {
|
||||||
|
Loading…
Reference in New Issue
Block a user