mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
24 lines
413 B
Go
24 lines
413 B
Go
package config
|
|
|
|
import (
|
|
"github.com/crawlab-team/crawlab/core/interfaces"
|
|
)
|
|
|
|
type PathService struct {
|
|
cfgPath string
|
|
}
|
|
|
|
func (svc *PathService) GetConfigPath() (path string) {
|
|
return svc.cfgPath
|
|
}
|
|
|
|
func (svc *PathService) SetConfigPath(path string) {
|
|
svc.cfgPath = path
|
|
}
|
|
|
|
func NewConfigPathService() (svc interfaces.WithConfigPath) {
|
|
svc = &PathService{}
|
|
svc.SetConfigPath(GetConfigPath())
|
|
return svc
|
|
}
|