Skip to content

Commit 93279d3

Browse files
committed
Fix lint
1 parent 7a16b12 commit 93279d3

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

cmd/cert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
var CmdCert = cli.Command{
2929
Name: "cert",
3030
Usage: "Generate self-signed certificate",
31-
Description: `Generate a self-signed db.DefaultContext().Engine().509 certificate for a TLS server.
31+
Description: `Generate a self-signed x.509 certificate for a TLS server.
3232
Outputs to 'cert.pem' and 'key.pem' and will overwrite existing files.`,
3333
Action: runCert,
3434
Flags: []cli.Flag{

models/db/models.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ func RegisterModel(bean interface{}, initFunc ...func() error) {
4646

4747
func init() {
4848
/*tables = append(tables,
49-
new(User),
50-
new(PublicKey),
51-
new(AccessToken),
52-
new(Repository),
5349
new(DeployKey),
5450
new(Collaboration),
5551
new(Access),

models/repo.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ type Repository struct {
252252
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
253253
}
254254

255+
func init() {
256+
db.RegisterModel(new(Repository))
257+
}
258+
255259
// SanitizedOriginalURL returns a sanitized OriginalURL
256260
func (repo *Repository) SanitizedOriginalURL() string {
257261
if repo.OriginalURL == "" {

models/ssh_key.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ type PublicKey struct {
4848
HasUsed bool `xorm:"-"`
4949
}
5050

51+
func init() {
52+
db.RegisterModel(new(PublicKey))
53+
}
54+
5155
// AfterLoad is invoked from XORM after setting the values of all fields of this object.
5256
func (key *PublicKey) AfterLoad() {
5357
key.HasUsed = key.UpdatedUnix > key.CreatedUnix

models/user.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ type User struct {
163163
KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"`
164164
}
165165

166+
func init() {
167+
db.RegisterModel(new(User))
168+
}
169+
166170
// SearchOrganizationsOptions options to filter organizations
167171
type SearchOrganizationsOptions struct {
168172
ListOptions

0 commit comments

Comments
 (0)