mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
- Replaced direct calls to getBaseFileFsSvc with a new method fs.GetBaseFileFsSvc in base_file.go for improved clarity and maintainability. - Introduced SpiderTemplateService interface and implemented registry service for managing spider templates, enhancing template handling in the spider controller. - Added template-related fields to the Spider model to support template functionality. - Created utility functions for string case conversions in utils/string.go to facilitate consistent formatting across the codebase. - Updated environment configuration to retrieve the Python path dynamically, improving flexibility in the task runner's setup.
15 lines
341 B
Go
15 lines
341 B
Go
package fs
|
|
|
|
import (
|
|
"github.com/crawlab-team/crawlab/core/interfaces"
|
|
"github.com/crawlab-team/crawlab/core/utils"
|
|
"path/filepath"
|
|
)
|
|
|
|
func GetBaseFileFsSvc(rootPath string) (svc interfaces.FsService, err error) {
|
|
workspacePath := utils.GetWorkspace()
|
|
fsSvc := NewFsService(filepath.Join(workspacePath, rootPath))
|
|
|
|
return fsSvc, nil
|
|
}
|