correct comments which erroneously referenced removed logger parameter

This commit is contained in:
R. Aidan Campbell 2021-10-10 16:57:03 -07:00
commit e840aacc21
No known key found for this signature in database
GPG key ID: 0985399E9CD6A99B
11 changed files with 11 additions and 12 deletions

View file

@ -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)

View file

@ -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{},

View file

@ -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,

View file

@ -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.

View file

@ -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)

View file

@ -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.

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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)
}

View file

@ -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)
}