go declared and not used

Go语言在代码规范中定义未使用的变量会报“declared and not used”错误

package main

import "fmt"

func main() {
	var a, b, c int64
	a = 10
	b = 15
	c = a + b
	fmt.Printf("a = %d,b = %d",a ,b)
	//fmt.Printf("c = %d",c)
}

这时候会报错变量c定义未使用

.	est.go:9:6: c declared and not used
原文地址:https://www.cnblogs.com/niuben/p/13564704.html