diff --git a/cmd/gotosocial/runaction.go b/cmd/gotosocial/runaction.go index dceb0a50d..c8af9ddbe 100644 --- a/cmd/gotosocial/runaction.go +++ b/cmd/gotosocial/runaction.go @@ -41,7 +41,7 @@ func runAction(c *cli.Context, a cliactions.GTSAction) error { return fmt.Errorf("error parsing config: %s", err) } - // create a logger with the log level, formatting, and output splitter already set + // initialize the global logger to the log level, with formatting and output splitter already set err = log.Initialize(conf.LogLevel) if err != nil { return fmt.Errorf("error creating logger: %s", err) diff --git a/internal/federation/federatingdb/db.go b/internal/federation/federatingdb/db.go index 3a52cf345..039c70168 100644 --- a/internal/federation/federatingdb/db.go +++ b/internal/federation/federatingdb/db.go @@ -49,7 +49,7 @@ type federatingDB struct { typeConverter typeutils.TypeConverter } -// New returns a DB interface using the given database, config, and logger. +// New returns a DB interface using the given database and config func New(db db.DB, config *config.Config) DB { fdb := federatingDB{ mutex: sync.Mutex{}, diff --git a/internal/media/handler.go b/internal/media/handler.go index 9f8182ff1..fb4ed307e 100644 --- a/internal/media/handler.go +++ b/internal/media/handler.go @@ -89,7 +89,7 @@ type mediaHandler struct { storage *kv.KVStore } -// New returns a new handler with the given config, db, storage, and logger +// New returns a new handler with the given config, db, and storage func New(config *config.Config, database db.DB, storage *kv.KVStore) Handler { return &mediaHandler{ config: config, diff --git a/internal/oidc/idp.go b/internal/oidc/idp.go index d1d86122c..3032d15d5 100644 --- a/internal/oidc/idp.go +++ b/internal/oidc/idp.go @@ -50,7 +50,7 @@ type idp struct { oidcConf *oidc.Config } -// NewIDP returns a new IDP configured with the given config and logger. +// NewIDP returns a new IDP configured with the given config. // If the passed config contains a nil value for the OIDCConfig, or OIDCConfig.Enabled // is set to false, then nil, nil will be returned. If OIDCConfig.Enabled is true, // then the other OIDC config fields must also be set. diff --git a/internal/processing/processor.go b/internal/processing/processor.go index a63ec6633..5732ad092 100644 --- a/internal/processing/processor.go +++ b/internal/processing/processor.go @@ -249,7 +249,7 @@ type processor struct { mediaProcessor mediaProcessor.Processor } -// NewProcessor returns a new Processor that uses the given federator and logger +// NewProcessor returns a new Processor that uses the given federator func NewProcessor(config *config.Config, tc typeutils.TypeConverter, federator federation.Federator, oauthServer oauth.Server, mediaHandler media.Handler, storage *kv.KVStore, timelineManager timeline.Manager, db db.DB) Processor { fromClientAPI := make(chan messages.FromClientAPI, 1000) fromFederator := make(chan messages.FromFederator, 1000) diff --git a/internal/router/router.go b/internal/router/router.go index ce91cbe5c..130832f74 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -98,7 +98,7 @@ func (r *router) Stop(ctx context.Context) error { return r.srv.Shutdown(ctx) } -// New returns a new Router with the specified configuration, using the given logrus logger. +// New returns a new Router with the specified configuration. // // The given DB is only used in the New function for parsing config values, and is not otherwise // pinned to the router. diff --git a/internal/trans/exporter.go b/internal/trans/exporter.go index 5e2273cf6..d6d5678d0 100644 --- a/internal/trans/exporter.go +++ b/internal/trans/exporter.go @@ -34,7 +34,7 @@ type exporter struct { writtenIDs map[string]bool } -// NewExporter returns a new Exporter that will use the given db and logger. +// NewExporter returns a new Exporter that will use the given db. func NewExporter(db db.DB) Exporter { return &exporter{ db: db, diff --git a/internal/trans/importer.go b/internal/trans/importer.go index 7bce4a29c..81029a098 100644 --- a/internal/trans/importer.go +++ b/internal/trans/importer.go @@ -33,7 +33,7 @@ type importer struct { db db.DB } -// NewImporter returns a new Importer interface that uses the given db and logger. +// NewImporter returns a new Importer interface that uses the given db. func NewImporter(db db.DB) Importer { return &importer{ db: db, diff --git a/internal/visibility/filter.go b/internal/visibility/filter.go index 18c7c988e..b5f49c831 100644 --- a/internal/visibility/filter.go +++ b/internal/visibility/filter.go @@ -47,7 +47,7 @@ type filter struct { db db.DB } -// NewFilter returns a new Filter interface that will use the provided database and logger. +// NewFilter returns a new Filter interface that will use the provided database. func NewFilter(db db.DB) Filter { return &filter{ db: db, diff --git a/testrig/mediahandler.go b/testrig/mediahandler.go index 922f9a12c..9ff8179c0 100644 --- a/testrig/mediahandler.go +++ b/testrig/mediahandler.go @@ -24,8 +24,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/media" ) -// NewTestMediaHandler returns a media handler with the default test config, the default test logger, -// and the given db and storage. +// NewTestMediaHandler returns a media handler with the default test config, and the given db and storage. func NewTestMediaHandler(db db.DB, storage *kv.KVStore) media.Handler { return media.New(NewTestConfig(), db, storage) } diff --git a/testrig/oauthserver.go b/testrig/oauthserver.go index efa68e226..3148e2790 100644 --- a/testrig/oauthserver.go +++ b/testrig/oauthserver.go @@ -25,7 +25,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -// NewTestOauthServer returns an oauth server with the given db, and the default test logger. +// NewTestOauthServer returns an oauth server with the given db func NewTestOauthServer(db db.DB) oauth.Server { return oauth.New(context.Background(), db) }