MCPcopy Index your code
hub / github.com/celer-pkg/celer / If

Function If

pkgs/expr/expr.go:36–41  ·  view source on GitHub ↗
(condition bool, first T, second T)

Source from the content-addressed store, hash-verified

34}
35
36func If[T any](condition bool, first T, second T) T {
37 if condition {
38 return first
39 }
40 return second
41}
42
43func UpperFirst(text string) string {
44 return strings.ToUpper(text[:1]) + strings.ToLower(text[1:])

Callers 15

writeCUDAConfigMethod · 0.92
CheckAndRepairMethod · 0.92
InstallMethod · 0.92
CloneMethod · 0.92
doInstallFromPkgCacheMethod · 0.92
InstallFromPackageMethod · 0.92
doInstallFromDevCacheMethod · 0.92
checkAllToolsMethod · 0.92
installDependenciesMethod · 0.92
prepareTmpDepsMethod · 0.92
RemoveLogsMethod · 0.92

Calls

no outgoing calls