code cleanup & refactoring

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2024-10-10 11:57:59 +02:00
parent 7d1a78cf9c
commit 0094d30378
52 changed files with 871 additions and 204 deletions
@@ -1,6 +1,8 @@
package debug
import (
"context"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/services/thumbnails/pkg/config"
)
@@ -13,6 +15,7 @@ type Options struct {
Name string
Address string
Logger log.Logger
Context context.Context
Config *config.Config
}
@@ -34,6 +37,13 @@ func Logger(val log.Logger) Option {
}
}
// Context provides a function to set the context option.
func Context(val context.Context) Option {
return func(o *Options) {
o.Context = val
}
}
// Config provides a function to set the config option.
func Config(val *config.Config) Option {
return func(o *Options) {