声明一致性
一、相似声明放于一组
//bad usage
import "a"
import "b"
//good usage
import (
"a"
"b"
)//bad usage
const a = 1
const b = 2
var a = 1
var b = 2
type Area float64
type Volume float64
//good usage
const (
a = 1
b = 2
)
var (
a = 1
b = 2
)
type (
Area float64
Volume float64
)二、相关声明放于一组
Last updated