1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00
2019-11-12 13:55:32 +01:00

30 lines
397 B
Go

package helper
import (
"fmt"
"os"
)
func checkError(err error) {
if err != nil {
fmt.Printf("Error occured: %v\n", err)
os.Exit(1)
}
}
func contains(v []string, s string) bool {
for _, i := range v {
if i == s {
return true
}
}
return false
}
func ifThenElse(condition bool, positive string, negative string) string {
if condition {
return positive
}
return negative
}