mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 05:56:14 -06:00
go fmt
This commit is contained in:
parent
f1e60e732f
commit
9191e967a7
9 changed files with 47 additions and 47 deletions
|
|
@ -40,18 +40,18 @@ func adminCommands() []*cli.Command {
|
|||
Usage: "create a new account",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Required: true,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: config.EmailFlag,
|
||||
Usage: config.EmailUsage,
|
||||
Name: config.EmailFlag,
|
||||
Usage: config.EmailUsage,
|
||||
Required: true,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: config.PasswordFlag,
|
||||
Usage: config.PasswordUsage,
|
||||
Name: config.PasswordFlag,
|
||||
Usage: config.PasswordUsage,
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -64,8 +64,8 @@ func adminCommands() []*cli.Command {
|
|||
Usage: "confirm an existing account manually, thereby skipping email confirmation",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -78,8 +78,8 @@ func adminCommands() []*cli.Command {
|
|||
Usage: "promote an account to admin",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -92,8 +92,8 @@ func adminCommands() []*cli.Command {
|
|||
Usage: "demote an account from admin to normal user",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -106,8 +106,8 @@ func adminCommands() []*cli.Command {
|
|||
Usage: "prevent an account from signing in or posting etc, but don't delete anything",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -120,8 +120,8 @@ func adminCommands() []*cli.Command {
|
|||
Usage: "completely remove an account and all of its posts, media, etc",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -134,13 +134,13 @@ func adminCommands() []*cli.Command {
|
|||
Usage: "set a new password for the given account",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Name: config.UsernameFlag,
|
||||
Usage: config.UsernameUsage,
|
||||
Required: true,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: config.PasswordFlag,
|
||||
Usage: config.PasswordUsage,
|
||||
Name: config.PasswordFlag,
|
||||
Usage: config.PasswordUsage,
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -155,8 +155,8 @@ func adminCommands() []*cli.Command {
|
|||
Usage: "export data from the database to file at the given path",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: config.TransPathFlag,
|
||||
Usage: config.TransPathUsage,
|
||||
Name: config.TransPathFlag,
|
||||
Usage: config.TransPathUsage,
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const (
|
|||
PasswordFlag = "password"
|
||||
PasswordUsage = "the password to set for this account"
|
||||
|
||||
TransPathFlag = "path"
|
||||
TransPathFlag = "path"
|
||||
TransPathUsage = "the path of the file to import from/export to"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ type importer struct {
|
|||
|
||||
func NewImporter(db db.DB, log *logrus.Logger) Importer {
|
||||
return &importer{
|
||||
db: db,
|
||||
log: log,
|
||||
db: db,
|
||||
log: log,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ package trans
|
|||
import "time"
|
||||
|
||||
type Block struct {
|
||||
Type TransType `json:"type" bun:"-"`
|
||||
ID string `json:"id"`
|
||||
Type TransType `json:"type" bun:"-"`
|
||||
ID string `json:"id"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
URI string `json:"uri"`
|
||||
AccountID string `json:"accountId"`
|
||||
TargetAccountID string `json:"targetAccountId"`
|
||||
URI string `json:"uri"`
|
||||
AccountID string `json:"accountId"`
|
||||
TargetAccountID string `json:"targetAccountId"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ package trans
|
|||
import "time"
|
||||
|
||||
type Follow struct {
|
||||
Type TransType `json:"type" bun:"-"`
|
||||
ID string `json:"id"`
|
||||
Type TransType `json:"type" bun:"-"`
|
||||
ID string `json:"id"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
URI string `json:"uri"`
|
||||
AccountID string `json:"accountId"`
|
||||
TargetAccountID string `json:"targetAccountId"`
|
||||
URI string `json:"uri"`
|
||||
AccountID string `json:"accountId"`
|
||||
TargetAccountID string `json:"targetAccountId"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ package trans
|
|||
import "time"
|
||||
|
||||
type FollowRequest struct {
|
||||
Type TransType `json:"type" bun:"-"`
|
||||
ID string `json:"id"`
|
||||
Type TransType `json:"type" bun:"-"`
|
||||
ID string `json:"id"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
URI string `json:"uri"`
|
||||
AccountID string `json:"accountId"`
|
||||
TargetAccountID string `json:"targetAccountId"`
|
||||
URI string `json:"uri"`
|
||||
AccountID string `json:"accountId"`
|
||||
TargetAccountID string `json:"targetAccountId"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ type Instance struct {
|
|||
Domain string `json:"domain"`
|
||||
Title string `json:"title,omitempty" bun:",nullzero"`
|
||||
URI string `json:"uri"`
|
||||
SuspendedAt *time.Time `json:"suspendedAt,omitempty" bun:",nullzero"`
|
||||
SuspendedAt *time.Time `json:"suspendedAt,omitempty" bun:",nullzero"`
|
||||
DomainBlockID string `json:"domainBlockID,omitempty" bun:",nullzero"`
|
||||
ShortDescription string `json:"shortDescription,omitempty" bun:",nullzero"`
|
||||
Description string `json:"description,omitempty" bun:",nullzero"`
|
||||
|
|
|
|||
|
|
@ -29,21 +29,21 @@ type User struct {
|
|||
Email string `json:"email,omitempty" bun:",nullzero"`
|
||||
AccountID string `json:"accountID"`
|
||||
EncryptedPassword string `json:"encryptedPassword"`
|
||||
CurrentSignInAt *time.Time `json:"currentSignInAt,omitempty" bun:",nullzero"`
|
||||
LastSignInAt *time.Time `json:"lastSignInAt,omitempty" bun:",nullzero"`
|
||||
CurrentSignInAt *time.Time `json:"currentSignInAt,omitempty" bun:",nullzero"`
|
||||
LastSignInAt *time.Time `json:"lastSignInAt,omitempty" bun:",nullzero"`
|
||||
InviteID string `json:"inviteID,omitempty" bun:",nullzero"`
|
||||
ChosenLanguages []string `json:"chosenLanguages,omitempty" bun:",nullzero"`
|
||||
FilteredLanguages []string `json:"filteredLanguage,omitempty" bun:",nullzero"`
|
||||
Locale string `json:"locale" bun:",nullzero"`
|
||||
LastEmailedAt time.Time `json:"lastEmailedAt,omitempty" bun:",nullzero"`
|
||||
ConfirmationToken string `json:"confirmationToken,omitempty" bun:",nullzero"`
|
||||
ConfirmationSentAt *time.Time `json:"confirmationTokenSentAt,omitempty" bun:",nullzero"`
|
||||
ConfirmedAt *time.Time `json:"confirmedAt,omitempty" bun:",nullzero"`
|
||||
ConfirmationSentAt *time.Time `json:"confirmationTokenSentAt,omitempty" bun:",nullzero"`
|
||||
ConfirmedAt *time.Time `json:"confirmedAt,omitempty" bun:",nullzero"`
|
||||
UnconfirmedEmail string `json:"unconfirmedEmail,omitempty" bun:",nullzero"`
|
||||
Moderator bool `json:"moderator"`
|
||||
Admin bool `json:"admin"`
|
||||
Disabled bool `json:"disabled"`
|
||||
Approved bool `json:"approved"`
|
||||
ResetPasswordToken string `json:"resetPasswordToken,omitempty" bun:",nullzero"`
|
||||
ResetPasswordSentAt *time.Time `json:"resetPasswordSentAt,omitempty" bun:",nullzero"`
|
||||
ResetPasswordSentAt *time.Time `json:"resetPasswordSentAt,omitempty" bun:",nullzero"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ type TransTestSuite struct {
|
|||
|
||||
func (suite *TransTestSuite) SetupTest() {
|
||||
suite.db = testrig.NewTestDB()
|
||||
suite.log = testrig.NewTestLog()
|
||||
suite.log = testrig.NewTestLog()
|
||||
testrig.StandardDBSetup(suite.db, nil)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue