MCPcopy
hub / github.com/expr-lang/expr / Sprintf

Method Sprintf

internal/spew/config.go:208–210  ·  view source on GitHub ↗

Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were passed with a Formatter interface returned by c.NewFormatter. It returns the resulting string. See NewFormatter for formatting details. This function is shorthand for the following syntax: fmt.Sprintf(format, c.NewForm

(format string, a ...interface{})

Source from the content-addressed store, hash-verified

206//
207// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b))
208func (c *ConfigState) Sprintf(format string, a ...interface{}) string {
209 return fmt.Sprintf(format, c.convertArgs(a)...)
210}
211
212// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
213// were passed with a Formatter interface returned by c.NewFormatter. It

Callers 15

FunctionFunction · 0.80
TestExpr_timeoutFunction · 0.80
StringMethod · 0.80
StringMethod · 0.80
EnvWithCacheFunction · 0.80
addConstantMethod · 0.80
addVariableMethod · 0.80
addFunctionMethod · 0.80
compileMethod · 0.80
IntegerNodeMethod · 0.80
UnaryNodeMethod · 0.80

Calls 1

convertArgsMethod · 0.95

Tested by 15

TestExpr_timeoutFunction · 0.64
TestCheck_TypeWeightsFunction · 0.64
TestCheck_env_keywordFunction · 0.64
TestOperator_FunctionFunction · 0.64
TestIssue817_2Function · 0.64
TestTimeFunction · 0.64
testRingFunction · 0.64
TestObjectsAreEqualFunction · 0.64
TestEqualFunction · 0.64