EdgeX初始化代码这块看起来比较迷糊,写一个测试代码验证下
1、测试代码
package main import "fmt" type Get func(serviceName string) interface{} func get1(serviceName string) interface{} { return serviceName } var a = func(get Get, serviceName string) interface{} { return get(serviceName) } func main() { fmt.Println(a(get1, "aaa")) }
2、输出结果
aaa