Beispiel #1
0
func logFunctionCall(callable types.FuCallable, args types.ArgSource) {
	argstrings := make([]string, len(args.Args()))
	for i, arg := range args.Args() {
		argstrings[i] = arg.String()
	}
	log.Info("%s(%s)", callable.Name(), strings.Join(argstrings, ", "))
}
Beispiel #2
0
func Test_PythonCallable(t *testing.T) {
	var callable types.FuCallable
	callable = MakePythonCallable("fred", nil)
	assert.Equal(t, "fred", callable.Name())
	assert.Equal(t, "python:fred()", callable.String())
	assert.Equal(t, "fred", callable.ValueString())

	_ = callable.Code()
}