mirror of
https://github.com/slsa-framework/slsa-verifier.git
synced 2026-05-07 00:56:39 +00:00
Support pre-releases on trusted repos --------- Signed-off-by: Ian Lewis <ianlewis@google.com>
25 lines
518 B
Go
25 lines
518 B
Go
package options
|
|
|
|
import (
|
|
"os"
|
|
"strconv"
|
|
)
|
|
|
|
// ExperimentalEnabled returns true if experimental features are currently
|
|
// enabled.
|
|
func ExperimentalEnabled() bool {
|
|
if b, err := strconv.ParseBool(os.Getenv("SLSA_VERIFIER_EXPERIMENTAL")); err == nil {
|
|
return b
|
|
}
|
|
return false
|
|
}
|
|
|
|
// TestingEnabled returns true if the SLSA_VERIFIER_TESTING environment
|
|
// variable is set.
|
|
func TestingEnabled() bool {
|
|
if b, err := strconv.ParseBool(os.Getenv("SLSA_VERIFIER_TESTING")); err == nil {
|
|
return b
|
|
}
|
|
return false
|
|
}
|