From 13b71965aed2f1b930998ea67dec212d018c36b5 Mon Sep 17 00:00:00 2001 From: scjtqs Date: Tue, 16 Mar 2021 22:01:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20lint=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 211d54c..42937f4 100644 --- a/main.go +++ b/main.go @@ -48,7 +48,6 @@ var d bool var h bool func init() { - var debug bool flag.StringVar(&c, "c", global.DefaultConfFile, "configuration filename default is config.hjson") flag.BoolVar(&d, "d", false, "running as a daemon") @@ -56,7 +55,7 @@ func init() { flag.BoolVar(&h, "h", false, "this help") flag.Parse() - //通过-c 参数替换 配置文件路径 + // 通过-c 参数替换 配置文件路径 global.DefaultConfFile = c logFormatter := &easy.Formatter{ TimestampFormat: "2006-01-02 15:04:05", @@ -74,10 +73,10 @@ func init() { } if debug { - conf.Debug=true + conf.Debug = true } // 在debug模式下,将在标准输出中打印当前执行行数 - if conf.Debug{ + if conf.Debug { log.SetReportCaller(true) }