Update config flow

This commit is contained in:
problematicconsumer
2023-08-19 14:09:49 +03:30
parent 076a25ea42
commit b43301ca0b
4 changed files with 35 additions and 58 deletions

View File

@@ -34,11 +34,7 @@ func Setup(basePath string, workingPath string, tempPath string) {
sGroupID = os.Getgid()
}
func NewService(configContent string) (*BoxService, error) {
options, err := parseConfig(configContent)
if err != nil {
return nil, err
}
func NewService(options option.Options) (*BoxService, error) {
ctx, cancel := context.WithCancel(context.Background())
ctx = filemanager.WithDefault(ctx, sWorkingPath, sTempPath, sUserID, sGroupID)
ctx = service.ContextWithPtr(ctx, urltest.NewHistoryStorage())