Skip to main content

resolve

Function resolve 

Source
pub fn resolve(cache: &GoEnvCache, policy: &RegistryAccessPolicy) -> GoEnvConfig
Expand description

Resolves $GOENV into a GoEnvConfig (spec FR-001–FR-008).

None/an unreadable path (no $GOENV file at all) resolves to GoEnvConfig::default — every dependency keeps resolving to plain DependencySource::Registry (US-005, NFR-004: no additional filesystem/network activity beyond the one stat MtimeFileCache already performs).

§Examples

use deps_core::net_policy::RegistryAccessPolicy;
use deps_go::config::{GoEnvCache, resolve};

let cache = GoEnvCache::new();
let policy = RegistryAccessPolicy::default();
let config = resolve(&cache, &policy);
// No override anywhere in a typical test/CI environment with no $GOENV file.
assert!(config.goproxy_chain().is_none() || config.goproxy_chain().is_some());