如何在GoLang中用混合类型的字符串和数字对整数数组进行求和?使用“不匹配类型int and any”和“无法用2个值初始化1个变量”的错误下面的代码。有类似JavaScript解决方案的东西吗?错误代码:"fmt")
fmt.Println(sum([]any{9, 1, "8", "2"})) // this
Enter the Numbers 4在这个谁熟悉眼镜蛇,计算是我的项目和添加是我正在使用的命令,我希望输入作为Calc add N2 2 4(在单行)和输出应该显示,其中N是一个变量,确定输入的数量和2 4是要添加的数字。Use: "add",
Short: "Addition value of given Number