// 错误示例var gvar int 	// 全局变量,声明不使用也可以
func main() {
	var one int 	// error: one declared and not used
	two := 2	// error: two declared and not used
	var three int	// error: three declared and not used
	three = 3
}
// 正确示例// 可以直接注释或移除未使用的变量
func main() {
	var one int
	_ = one

	two := 2
	println(two)

	var three int
	one = three	var four int
	four = four
}
//1234567891011121314151617181920212223242526

 

(3)nssm,全称non-sucking server manager

NSSM是一个服务封装程序,它可以将普通exe程序封装成服务,使之像windows服务一样运行。它几乎可以把任何exe封装成系统服务(有界面和对话框的不适合这么做),还能守护这个第三方程序不被杀掉,而且还有图形操作界面,方便小白使用。

♥nssm的简单范例