MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / godebug

Function godebug

crates/runner-shared/src/runtime_env/go.rs:14–19  ·  view source on GitHub ↗

Prepends our settings to the user's `GODEBUG`. Go uses the last occurrence of a setting, so an explicit `randautoseed` from the user still wins.

(user_godebug: Option<&str>)

Source from the content-addressed store, hash-verified

12/// Prepends our settings to the user's `GODEBUG`. Go uses the last occurrence
13/// of a setting, so an explicit `randautoseed` from the user still wins.
14fn godebug(user_godebug: Option<&str>) -> String {
15 match user_godebug {
16 Some(user) if !user.is_empty() => format!("{RANDAUTOSEED_OFF},{user}"),
17 _ => RANDAUTOSEED_OFF.to_owned(),
18 }
19}
20
21#[cfg(test)]
22mod tests {

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected