MCPcopy Index your code
hub / github.com/celer-pkg/celer / GetBuildConfig

Method GetBuildConfig

configs/port_pkgcache.go:262–276  ·  view source on GitHub ↗
(nameVersion string, native bool)

Source from the content-addressed store, hash-verified

260}
261
262func (p Port) GetBuildConfig(nameVersion string, native bool) (*pkgcache.BuildConfig, error) {
263 key := fmt.Sprintf("%s|%t", nameVersion, native)
264 if v, ok := buildConfigCache.Load(key); ok {
265 return v.(*pkgcache.BuildConfig), nil
266 }
267
268 var port = Port{DevDep: native, HostDep: native}
269 if err := port.Init(p.ctx, nameVersion); err != nil {
270 return nil, err
271 }
272
273 config := p.toPkgCacheBuildConfig(port.MatchedConfig, port.portFile)
274 buildConfigCache.Store(key, &config)
275 return &config, nil
276}
277
278// CheckHostSupported Host supported means that the port can be built natively.
279func (p Port) CheckHostSupported(nameVersion string) bool {

Callers 1

preWarmMetaCacheMethod · 0.95

Calls 4

toPkgCacheBuildConfigMethod · 0.95
SprintfMethod · 0.80
InitMethod · 0.65
StoreMethod · 0.65

Tested by

no test coverage detected