MCPcopy
hub / github.com/trustwallet/assets / InitAssetsService

Function InitAssetsService

internal/manager/manager.go:129–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127}
128
129func InitAssetsService() *service.Service {
130 setup()
131
132 paths, err := file.ReadLocalFileStructure(root, config.Default.ValidatorsSettings.RootFolder.SkipFiles)
133 if err != nil {
134 log.WithError(err).Fatal("Failed to load file structure.")
135 }
136
137 paths = filter(paths, func(path string) bool {
138 for _, dir := range config.Default.ValidatorsSettings.RootFolder.SkipDirs {
139 if strings.Contains(path, dir) {
140 return false
141 }
142 }
143 return true
144 })
145
146 fileService := file.NewService(paths...)
147 validatorsService := processor.NewService(fileService)
148 reportService := report.NewService()
149
150 return service.NewService(fileService, validatorsService, reportService, paths)
151}
152
153func setup() {
154 if err := config.SetConfig(configPath); err != nil {

Callers 1

manager.goFile · 0.85

Calls 5

NewServiceFunction · 0.92
NewServiceFunction · 0.92
NewServiceFunction · 0.92
setupFunction · 0.85
filterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…