blob: da163da220991afb6a45bae758c97387bb7975ca [file] [log] [blame]
Quentin Smith8b9eb182017-01-05 11:01:47 -05001// Copyright 2017 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package db
6
Quentin Smith4b028982017-01-14 23:21:11 -05007import (
8 "database/sql"
9 "time"
10)
Quentin Smith8b9eb182017-01-05 11:01:47 -050011
Quentin Smith8b9eb182017-01-05 11:01:47 -050012func DBSQL(db *DB) *sql.DB {
13 return db.sql
14}
Quentin Smith4b028982017-01-14 23:21:11 -050015
16func SetNow(t time.Time) {
17 if t.IsZero() {
18 now = time.Now
19 return
20 }
21 now = func() time.Time { return t }
22}