package calc // package 一定要放在最上面 func Add(x, y int) int { // 首字母大写表示公有方法 return x + y } func Sub(x, y int) int { return x - y }