mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-22 11:46:40 +00:00
go fmt (#278)
This commit is contained in:
parent
27605f7c47
commit
a07e62e49e
|
@ -28,8 +28,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
func newDebugQueryHook() bun.QueryHook {
|
func newDebugQueryHook() bun.QueryHook {
|
||||||
return &debugQueryHook{
|
return &debugQueryHook{}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// debugQueryHook implements bun.QueryHook
|
// debugQueryHook implements bun.QueryHook
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
// tokenStore is an implementation of oauth2.TokenStore, which uses our db interface as a storage backend.
|
// tokenStore is an implementation of oauth2.TokenStore, which uses our db interface as a storage backend.
|
||||||
type tokenStore struct {
|
type tokenStore struct {
|
||||||
oauth2.TokenStore
|
oauth2.TokenStore
|
||||||
db db.Basic
|
db db.Basic
|
||||||
}
|
}
|
||||||
|
|
||||||
// newTokenStore returns a token store that satisfies the oauth2.TokenStore interface.
|
// newTokenStore returns a token store that satisfies the oauth2.TokenStore interface.
|
||||||
|
@ -44,7 +44,7 @@ type tokenStore struct {
|
||||||
// the tokens in the DB once per minute and deletes any that have expired.
|
// the tokens in the DB once per minute and deletes any that have expired.
|
||||||
func newTokenStore(ctx context.Context, db db.Basic) oauth2.TokenStore {
|
func newTokenStore(ctx context.Context, db db.Basic) oauth2.TokenStore {
|
||||||
ts := &tokenStore{
|
ts := &tokenStore{
|
||||||
db: db,
|
db: db,
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the token store to clean out expired tokens once per minute, or return if we're done
|
// set the token store to clean out expired tokens once per minute, or return if we're done
|
||||||
|
|
|
@ -30,12 +30,12 @@ type Importer interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
type importer struct {
|
type importer struct {
|
||||||
db db.DB
|
db db.DB
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewImporter returns a new Importer interface that uses the given db.
|
// NewImporter returns a new Importer interface that uses the given db.
|
||||||
func NewImporter(db db.DB) Importer {
|
func NewImporter(db db.DB) Importer {
|
||||||
return &importer{
|
return &importer{
|
||||||
db: db,
|
db: db,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
type TransTestSuite struct {
|
type TransTestSuite struct {
|
||||||
suite.Suite
|
suite.Suite
|
||||||
db db.DB
|
db db.DB
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *TransTestSuite) SetupTest() {
|
func (suite *TransTestSuite) SetupTest() {
|
||||||
|
|
|
@ -44,12 +44,12 @@ type Filter interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
type filter struct {
|
type filter struct {
|
||||||
db db.DB
|
db db.DB
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFilter returns a new Filter interface that will use the provided database.
|
// NewFilter returns a new Filter interface that will use the provided database.
|
||||||
func NewFilter(db db.DB) Filter {
|
func NewFilter(db db.DB) Filter {
|
||||||
return &filter{
|
return &filter{
|
||||||
db: db,
|
db: db,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue