Skip to content

Commit 5782e3f

Browse files
author
Anthony Regeda
committed
added MakeVersionable func
1 parent 69f2f2a commit 5782e3f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

db.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ type Versionable struct {
2323
Version sql.NullInt64 `json:"-" y:"_version"`
2424
}
2525

26+
// MakeVersionable inits a new version
27+
func MakeVersionable(n int64) Versionable {
28+
return Versionable{
29+
sql.NullInt64{Int64: 1, Valid: true},
30+
}
31+
}
32+
2633
// DB describes db operations
2734
type DB interface {
2835
Execer

0 commit comments

Comments
 (0)