zotregistry.io/zot@v1.4.4-0.20231124084042-02a8ed785457/pkg/test/inject/prod.go (about) 1 //go:build !dev 2 // +build !dev 3 4 package inject 5 6 func Error(err error) error { 7 return err 8 } 9 10 func Ok(ok bool) bool { 11 return ok 12 } 13 14 func ErrStatusCode(statusCode int) int { 15 return statusCode 16 } 17 18 /** 19 * 20 * Failure injection infrastructure to cover hard-to-reach code paths (nop in production). 21 * 22 **/ 23 24 func InjectFailure(skip int) bool { return false }