reflect.Call() Function in Golang with Examples Last Updated : 03 May, 2020 Comments Improve Suggest changes Like Article Like Report Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.Call() Function in Golang is used to calls the function v with the input arguments in. To access this function, one needs to imports the reflect package in the program. Syntax: func (v Value) Call(in []Value) []Value Parameters: This function takes the following parameters: in : This parameter is the []Value type. Return Value: This function returns the output results as Values. Below examples illustrate the use of the above method in Golang: Example 1: C // Golang program to illustrate // reflect.Call() Function package main import "fmt" import "reflect" type T struct {} func (t *T) Geeks() { fmt.Println("GeekforGeeks") } func main() { var t T // use of Call() method val := reflect.ValueOf(&t).MethodByName("Geeks").Call([]reflect.Value{}) fmt.Println(val) } Output: GeekforGeeks [] Example 2: C // Golang program to illustrate // reflect.Call() Function package main import "fmt" import "reflect" type T struct {} func (t *T) Geeks() { fmt.Println("GeekforGeeks") } func (t *T) Geeks1() { fmt.Println("Golang Package :") fmt.Println("reflect") fmt.Println("Call() Function") } func main() { var t T var t1 T // use of Call() method reflect.ValueOf(&t).MethodByName("Geeks").Call([]reflect.Value{}) reflect.ValueOf(&t1).MethodByName("Geeks1").Call([]reflect.Value{}) } Output: GeekforGeeks Golang Package : reflect Call() Function Comment More infoAdvertise with us Next Article reflect.Call() Function in Golang with Examples S SHUBHAMSINGH10 Follow Improve Article Tags : Go Language Golang-reflect Similar Reads reflect.Cap() Function in Golang with Examples Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.Cap() Function in Golang is used to get the v's capacity. To access this function, one needs to imports the refle 1 min read reflect.Close() Function in Golang with Examples Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.Close() Function in Golang is used to close the channel v. To access this function, one needs to imports the refl 2 min read reflect.Addr() Function in Golang with Examples Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.Addr() Function in Golang is used to get the pointer value representing the address of v. To access this function 2 min read reflect.ChanOf() Function in Golang with Examples Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.ChanOf() Function in Golang is used to get the channel type with the given direction and element type, i.e., t re 1 min read reflect.Elem() Function in Golang with Examples Go language provides inbuilt support implementation of run-time reflection and allowing a program to manipulate objects with arbitrary types with the help of reflect package. The reflect.Elem() Function in Golang is used to get the value that the interface v contains or that the pointer v points to. 2 min read Like