From 3d77f81c7fed002c628db82d822cc46c56a57e64 Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 30 May 2021 13:12:00 +0200 Subject: Move a lot of stuff + tidy stuff (#37) Lots of renaming and moving stuff, some bug fixes, more lenient parsing of notifications and home timeline. --- cmd/gotosocial/main.go | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'cmd/gotosocial/main.go') diff --git a/cmd/gotosocial/main.go b/cmd/gotosocial/main.go index 1b7187809..50380dd39 100644 --- a/cmd/gotosocial/main.go +++ b/cmd/gotosocial/main.go @@ -23,11 +23,10 @@ import ( "os" "github.com/sirupsen/logrus" - "github.com/superseriousbusiness/gotosocial/internal/action" - "github.com/superseriousbusiness/gotosocial/internal/clitools/admin/account" + "github.com/superseriousbusiness/gotosocial/internal/cliactions" + "github.com/superseriousbusiness/gotosocial/internal/cliactions/admin/account" + "github.com/superseriousbusiness/gotosocial/internal/cliactions/server" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/db" - "github.com/superseriousbusiness/gotosocial/internal/gotosocial" "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/superseriousbusiness/gotosocial/testrig" @@ -259,7 +258,7 @@ func main() { Name: "start", Usage: "start the gotosocial server", Action: func(c *cli.Context) error { - return runAction(c, gotosocial.Run) + return runAction(c, server.Start) }, }, }, @@ -362,19 +361,19 @@ func main() { }, }, }, - { - Name: "db", - Usage: "database-related tasks and utils", - Subcommands: []*cli.Command{ - { - Name: "init", - Usage: "initialize a database with the required schema for gotosocial; has no effect & is safe to run on an already-initialized db", - Action: func(c *cli.Context) error { - return runAction(c, db.Initialize) - }, - }, - }, - }, + // { + // Name: "db", + // Usage: "database-related tasks and utils", + // Subcommands: []*cli.Command{ + // { + // Name: "init", + // Usage: "initialize a database with the required schema for gotosocial; has no effect & is safe to run on an already-initialized db", + // Action: func(c *cli.Context) error { + // return runAction(c, db.Initialize) + // }, + // }, + // }, + // }, { Name: "testrig", Usage: "gotosocial testrig tasks", @@ -399,7 +398,7 @@ func main() { // runAction builds up the config and logger necessary for any // gotosocial action, and then executes the action. -func runAction(c *cli.Context, a action.GTSAction) error { +func runAction(c *cli.Context, a cliactions.GTSAction) error { // create a new *config.Config based on the config path provided... conf, err := config.FromFile(c.String(config.GetFlagNames().ConfigPath)) -- cgit v1.2.3