From c561d4461c95a3480cb7a180cb45f4c343c88188 Mon Sep 17 00:00:00 2001 From: Sasha Melentyev Date: Mon, 6 Feb 2023 00:35:52 +0300 Subject: [PATCH] Mark os consts as deprecated (#88) Mark os consts as deprecated --- .github/workflows/ci.yaml | 2 +- go.mod | 6 +- go.sum | 13 +- pkg/analyzer/analyzer.go | 20 +-- pkg/analyzer/internal/gen.go | 12 -- pkg/analyzer/internal/mapping/mapping.go | 4 - pkg/analyzer/internal/mapping/osdevnull.go | 9 -- .../internal/mapping/syslogpriority.go | 40 ------ pkg/analyzer/os_dev_test.go | 10 -- pkg/analyzer/syslog_priority_test.go | 10 -- pkg/analyzer/testdata/src/a/os/devnull.go | 15 --- .../testdata/src/a/syslog/priority.go | 121 ------------------ 12 files changed, 15 insertions(+), 247 deletions(-) delete mode 100644 pkg/analyzer/internal/mapping/osdevnull.go delete mode 100644 pkg/analyzer/internal/mapping/syslogpriority.go delete mode 100644 pkg/analyzer/os_dev_test.go delete mode 100644 pkg/analyzer/syslog_priority_test.go delete mode 100755 pkg/analyzer/testdata/src/a/os/devnull.go delete mode 100755 pkg/analyzer/testdata/src/a/syslog/priority.go diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f9b707..3f10b3d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ on: branches: [ main ] env: - GO_VERSION: 1.19.2 + GO_VERSION: 1.19.4 jobs: run: diff --git a/go.mod b/go.mod index 1de1e0f..38d6fbc 100644 --- a/go.mod +++ b/go.mod @@ -2,9 +2,9 @@ module github.com/sashamelentyev/usestdlibvars go 1.19 -require golang.org/x/tools v0.1.12 +require golang.org/x/tools v0.5.0 require ( - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect + golang.org/x/mod v0.7.0 // indirect + golang.org/x/sys v0.4.0 // indirect ) diff --git a/go.sum b/go.sum index 6e8ae43..2baf09c 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,7 @@ -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= diff --git a/pkg/analyzer/analyzer.go b/pkg/analyzer/analyzer.go index 65eef5d..441e0c1 100644 --- a/pkg/analyzer/analyzer.go +++ b/pkg/analyzer/analyzer.go @@ -48,11 +48,11 @@ func flags() flag.FlagSet { flags.Bool(TimeLayoutFlag, false, "suggest the use of time.Layout") flags.Bool(CryptoHashFlag, false, "suggest the use of crypto.Hash.String()") flags.Bool(RPCDefaultPathFlag, false, "suggest the use of rpc.DefaultXXPath") - flags.Bool(OSDevNullFlag, false, "suggest the use of os.DevNull") + flags.Bool(OSDevNullFlag, false, "[DEPRECATED] suggest the use of os.DevNull") flags.Bool(SQLIsolationLevelFlag, false, "suggest the use of sql.LevelXX.String()") flags.Bool(TLSSignatureSchemeFlag, false, "suggest the use of tls.SignatureScheme.String()") flags.Bool(ConstantKindFlag, false, "suggest the use of constant.Kind.String()") - flags.Bool(SyslogPriorityFlag, false, "suggest the use of syslog.Priority") + flags.Bool(SyslogPriorityFlag, false, "[DEPRECATED] suggest the use of syslog.Priority") return *flags } @@ -461,13 +461,7 @@ func checkRPCDefaultPath(pass *analysis.Pass, basicLit *ast.BasicLit) { } } -func checkOSDevNull(pass *analysis.Pass, basicLit *ast.BasicLit) { - currentVal := getBasicLitValue(basicLit) - - if newVal, ok := mapping.OSDevNull[currentVal]; ok { - report(pass, basicLit.Pos(), currentVal, newVal) - } -} +func checkOSDevNull(pass *analysis.Pass, basicLit *ast.BasicLit) {} func checkSQLIsolationLevel(pass *analysis.Pass, basicLit *ast.BasicLit) { currentVal := getBasicLitValue(basicLit) @@ -493,13 +487,7 @@ func checkConstantKind(pass *analysis.Pass, basicLit *ast.BasicLit) { } } -func checkSyslogPriority(pass *analysis.Pass, basicLit *ast.BasicLit) { - currentVal := getBasicLitValue(basicLit) - - if newVal, ok := mapping.SyslogPriority[currentVal]; ok { - report(pass, basicLit.Pos(), currentVal, newVal) - } -} +func checkSyslogPriority(pass *analysis.Pass, basicLit *ast.BasicLit) {} // getBasicLitFromArgs gets the *ast.BasicLit of a function argument. // diff --git a/pkg/analyzer/internal/gen.go b/pkg/analyzer/internal/gen.go index fc26b2e..2121131 100644 --- a/pkg/analyzer/internal/gen.go +++ b/pkg/analyzer/internal/gen.go @@ -83,12 +83,6 @@ func main() { templateName: "test-issue32.go.tmpl", fileName: "pkg/analyzer/testdata/src/a/http/issue32.go", }, - { - mapping: mapping.OSDevNull, - packageName: "os_test", - templateName: "test-template.go.tmpl", - fileName: "pkg/analyzer/testdata/src/a/os/devnull.go", - }, { mapping: mapping.SQLIsolationLevel, packageName: "sql_test", @@ -107,12 +101,6 @@ func main() { templateName: "test-template.go.tmpl", fileName: "pkg/analyzer/testdata/src/a/constant/kind.go", }, - { - mapping: mapping.SyslogPriority, - packageName: "syslog_test", - templateName: "test-syslog.go.tmpl", - fileName: "pkg/analyzer/testdata/src/a/syslog/priority.go", - }, } for _, operation := range operations { diff --git a/pkg/analyzer/internal/mapping/mapping.go b/pkg/analyzer/internal/mapping/mapping.go index 2bd5894..b081ede 100644 --- a/pkg/analyzer/internal/mapping/mapping.go +++ b/pkg/analyzer/internal/mapping/mapping.go @@ -163,8 +163,6 @@ var TimeLayout = map[string]string{ time.StampNano: "time.StampNano", } -var OSDevNull = map[string]string{} - var SQLIsolationLevel = map[string]string{ // sql.LevelDefault.String(): "sql.LevelDefault.String()", sql.LevelReadUncommitted.String(): "sql.LevelReadUncommitted.String()", @@ -199,5 +197,3 @@ var ConstantKind = map[string]string{ constant.Float.String(): "constant.Float.String()", constant.Complex.String(): "constant.Complex.String()", } - -var SyslogPriority = map[string]string{} diff --git a/pkg/analyzer/internal/mapping/osdevnull.go b/pkg/analyzer/internal/mapping/osdevnull.go deleted file mode 100644 index c75c129..0000000 --- a/pkg/analyzer/internal/mapping/osdevnull.go +++ /dev/null @@ -1,9 +0,0 @@ -//go:build unix || (js && wasm) - -package mapping - -import "os" - -func init() { - OSDevNull[os.DevNull] = "os.DevNull" -} diff --git a/pkg/analyzer/internal/mapping/syslogpriority.go b/pkg/analyzer/internal/mapping/syslogpriority.go deleted file mode 100644 index 4e6dc5d..0000000 --- a/pkg/analyzer/internal/mapping/syslogpriority.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build !windows && !plan9 - -package mapping - -import ( - "log/syslog" - "strconv" -) - -func init() { - // SyslogPriority[strconv.Itoa(int(syslog.LOG_EMERG))] = "syslog.LOG_EMERG" - SyslogPriority[strconv.Itoa(int(syslog.LOG_ALERT))] = "syslog.LOG_ALERT" - SyslogPriority[strconv.Itoa(int(syslog.LOG_CRIT))] = "syslog.LOG_CRIT" - SyslogPriority[strconv.Itoa(int(syslog.LOG_ERR))] = "syslog.LOG_ERR" - SyslogPriority[strconv.Itoa(int(syslog.LOG_WARNING))] = "syslog.LOG_WARNING" - SyslogPriority[strconv.Itoa(int(syslog.LOG_NOTICE))] = "syslog.LOG_NOTICE" - SyslogPriority[strconv.Itoa(int(syslog.LOG_INFO))] = "syslog.LOG_INFO" - SyslogPriority[strconv.Itoa(int(syslog.LOG_DEBUG))] = "syslog.LOG_DEBUG" - - // SyslogPriority[strconv.Itoa(int(syslog.LOG_KERN))] = "syslog.LOG_KERN" - SyslogPriority[strconv.Itoa(int(syslog.LOG_USER))] = "syslog.LOG_USER" - SyslogPriority[strconv.Itoa(int(syslog.LOG_MAIL))] = "syslog.LOG_MAIL" - SyslogPriority[strconv.Itoa(int(syslog.LOG_DAEMON))] = "syslog.LOG_DAEMON" - SyslogPriority[strconv.Itoa(int(syslog.LOG_AUTH))] = "syslog.LOG_AUTH" - SyslogPriority[strconv.Itoa(int(syslog.LOG_SYSLOG))] = "syslog.LOG_SYSLOG" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LPR))] = "syslog.LOG_LPR" - SyslogPriority[strconv.Itoa(int(syslog.LOG_NEWS))] = "syslog.LOG_NEWS" - SyslogPriority[strconv.Itoa(int(syslog.LOG_UUCP))] = "syslog.LOG_UUCP" - SyslogPriority[strconv.Itoa(int(syslog.LOG_CRON))] = "syslog.LOG_CRON" - SyslogPriority[strconv.Itoa(int(syslog.LOG_AUTHPRIV))] = "syslog.LOG_AUTHPRIV" - SyslogPriority[strconv.Itoa(int(syslog.LOG_FTP))] = "syslog.LOG_FTP" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LOCAL0))] = "syslog.LOG_LOCAL0" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LOCAL1))] = "syslog.LOG_LOCAL1" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LOCAL2))] = "syslog.LOG_LOCAL2" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LOCAL3))] = "syslog.LOG_LOCAL3" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LOCAL4))] = "syslog.LOG_LOCAL4" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LOCAL5))] = "syslog.LOG_LOCAL5" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LOCAL6))] = "syslog.LOG_LOCAL6" - SyslogPriority[strconv.Itoa(int(syslog.LOG_LOCAL7))] = "syslog.LOG_LOCAL7" -} diff --git a/pkg/analyzer/os_dev_test.go b/pkg/analyzer/os_dev_test.go deleted file mode 100644 index bbef44d..0000000 --- a/pkg/analyzer/os_dev_test.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build unix || (js && wasm) - -package analyzer_test - -import "github.com/sashamelentyev/usestdlibvars/pkg/analyzer" - -func init() { - flags = append(flags, analyzer.OSDevNullFlag) - pkgs = append(pkgs, "a/os") -} diff --git a/pkg/analyzer/syslog_priority_test.go b/pkg/analyzer/syslog_priority_test.go deleted file mode 100644 index f4d1547..0000000 --- a/pkg/analyzer/syslog_priority_test.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build !windows && !plan9 - -package analyzer_test - -import "github.com/sashamelentyev/usestdlibvars/pkg/analyzer" - -func init() { - flags = append(flags, analyzer.SyslogPriorityFlag) - pkgs = append(pkgs, "a/syslog") -} diff --git a/pkg/analyzer/testdata/src/a/os/devnull.go b/pkg/analyzer/testdata/src/a/os/devnull.go deleted file mode 100755 index 1d633da..0000000 --- a/pkg/analyzer/testdata/src/a/os/devnull.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by usestdlibvars, DO NOT EDIT. - -package os_test - -var ( - _ = "/dev/null" // want `"/dev/null" can be replaced by os\.DevNull` -) - -const ( - _ = "/dev/null" // want `"/dev/null" can be replaced by os\.DevNull` -) - -var ( - _ = func(s string) string { return s }("/dev/null") // want `"/dev/null" can be replaced by os\.DevNull` -) diff --git a/pkg/analyzer/testdata/src/a/syslog/priority.go b/pkg/analyzer/testdata/src/a/syslog/priority.go deleted file mode 100755 index 0431e01..0000000 --- a/pkg/analyzer/testdata/src/a/syslog/priority.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by usestdlibvars, DO NOT EDIT. - -package syslog_test - -import "log/syslog" - -var ( - _ = 1 - _ = 128 - _ = 136 - _ = 144 - _ = 152 - _ = 16 - _ = 160 - _ = 168 - _ = 176 - _ = 184 - _ = 2 - _ = 24 - _ = 3 - _ = 32 - _ = 4 - _ = 40 - _ = 48 - _ = 5 - _ = 56 - _ = 6 - _ = 64 - _ = 7 - _ = 72 - _ = 8 - _ = 80 - _ = 88 -) - -var ( - _, _ = syslog.New(1, "") // want `"1" can be replaced by syslog\.LOG_ALERT` - _, _ = syslog.New(128, "") // want `"128" can be replaced by syslog\.LOG_LOCAL0` - _, _ = syslog.New(136, "") // want `"136" can be replaced by syslog\.LOG_LOCAL1` - _, _ = syslog.New(144, "") // want `"144" can be replaced by syslog\.LOG_LOCAL2` - _, _ = syslog.New(152, "") // want `"152" can be replaced by syslog\.LOG_LOCAL3` - _, _ = syslog.New(16, "") // want `"16" can be replaced by syslog\.LOG_MAIL` - _, _ = syslog.New(160, "") // want `"160" can be replaced by syslog\.LOG_LOCAL4` - _, _ = syslog.New(168, "") // want `"168" can be replaced by syslog\.LOG_LOCAL5` - _, _ = syslog.New(176, "") // want `"176" can be replaced by syslog\.LOG_LOCAL6` - _, _ = syslog.New(184, "") // want `"184" can be replaced by syslog\.LOG_LOCAL7` - _, _ = syslog.New(2, "") // want `"2" can be replaced by syslog\.LOG_CRIT` - _, _ = syslog.New(24, "") // want `"24" can be replaced by syslog\.LOG_DAEMON` - _, _ = syslog.New(3, "") // want `"3" can be replaced by syslog\.LOG_ERR` - _, _ = syslog.New(32, "") // want `"32" can be replaced by syslog\.LOG_AUTH` - _, _ = syslog.New(4, "") // want `"4" can be replaced by syslog\.LOG_WARNING` - _, _ = syslog.New(40, "") // want `"40" can be replaced by syslog\.LOG_SYSLOG` - _, _ = syslog.New(48, "") // want `"48" can be replaced by syslog\.LOG_LPR` - _, _ = syslog.New(5, "") // want `"5" can be replaced by syslog\.LOG_NOTICE` - _, _ = syslog.New(56, "") // want `"56" can be replaced by syslog\.LOG_NEWS` - _, _ = syslog.New(6, "") // want `"6" can be replaced by syslog\.LOG_INFO` - _, _ = syslog.New(64, "") // want `"64" can be replaced by syslog\.LOG_UUCP` - _, _ = syslog.New(7, "") // want `"7" can be replaced by syslog\.LOG_DEBUG` - _, _ = syslog.New(72, "") // want `"72" can be replaced by syslog\.LOG_CRON` - _, _ = syslog.New(8, "") // want `"8" can be replaced by syslog\.LOG_USER` - _, _ = syslog.New(80, "") // want `"80" can be replaced by syslog\.LOG_AUTHPRIV` - _, _ = syslog.New(88, "") // want `"88" can be replaced by syslog\.LOG_FTP` -) - -var ( - _, _ = syslog.Dial("", "", 1, "") // want `"1" can be replaced by syslog\.LOG_ALERT` - _, _ = syslog.Dial("", "", 128, "") // want `"128" can be replaced by syslog\.LOG_LOCAL0` - _, _ = syslog.Dial("", "", 136, "") // want `"136" can be replaced by syslog\.LOG_LOCAL1` - _, _ = syslog.Dial("", "", 144, "") // want `"144" can be replaced by syslog\.LOG_LOCAL2` - _, _ = syslog.Dial("", "", 152, "") // want `"152" can be replaced by syslog\.LOG_LOCAL3` - _, _ = syslog.Dial("", "", 16, "") // want `"16" can be replaced by syslog\.LOG_MAIL` - _, _ = syslog.Dial("", "", 160, "") // want `"160" can be replaced by syslog\.LOG_LOCAL4` - _, _ = syslog.Dial("", "", 168, "") // want `"168" can be replaced by syslog\.LOG_LOCAL5` - _, _ = syslog.Dial("", "", 176, "") // want `"176" can be replaced by syslog\.LOG_LOCAL6` - _, _ = syslog.Dial("", "", 184, "") // want `"184" can be replaced by syslog\.LOG_LOCAL7` - _, _ = syslog.Dial("", "", 2, "") // want `"2" can be replaced by syslog\.LOG_CRIT` - _, _ = syslog.Dial("", "", 24, "") // want `"24" can be replaced by syslog\.LOG_DAEMON` - _, _ = syslog.Dial("", "", 3, "") // want `"3" can be replaced by syslog\.LOG_ERR` - _, _ = syslog.Dial("", "", 32, "") // want `"32" can be replaced by syslog\.LOG_AUTH` - _, _ = syslog.Dial("", "", 4, "") // want `"4" can be replaced by syslog\.LOG_WARNING` - _, _ = syslog.Dial("", "", 40, "") // want `"40" can be replaced by syslog\.LOG_SYSLOG` - _, _ = syslog.Dial("", "", 48, "") // want `"48" can be replaced by syslog\.LOG_LPR` - _, _ = syslog.Dial("", "", 5, "") // want `"5" can be replaced by syslog\.LOG_NOTICE` - _, _ = syslog.Dial("", "", 56, "") // want `"56" can be replaced by syslog\.LOG_NEWS` - _, _ = syslog.Dial("", "", 6, "") // want `"6" can be replaced by syslog\.LOG_INFO` - _, _ = syslog.Dial("", "", 64, "") // want `"64" can be replaced by syslog\.LOG_UUCP` - _, _ = syslog.Dial("", "", 7, "") // want `"7" can be replaced by syslog\.LOG_DEBUG` - _, _ = syslog.Dial("", "", 72, "") // want `"72" can be replaced by syslog\.LOG_CRON` - _, _ = syslog.Dial("", "", 8, "") // want `"8" can be replaced by syslog\.LOG_USER` - _, _ = syslog.Dial("", "", 80, "") // want `"80" can be replaced by syslog\.LOG_AUTHPRIV` - _, _ = syslog.Dial("", "", 88, "") // want `"88" can be replaced by syslog\.LOG_FTP` -) - -var ( - _, _ = syslog.NewLogger(1, 0) // want `"1" can be replaced by syslog\.LOG_ALERT` - _, _ = syslog.NewLogger(128, 0) // want `"128" can be replaced by syslog\.LOG_LOCAL0` - _, _ = syslog.NewLogger(136, 0) // want `"136" can be replaced by syslog\.LOG_LOCAL1` - _, _ = syslog.NewLogger(144, 0) // want `"144" can be replaced by syslog\.LOG_LOCAL2` - _, _ = syslog.NewLogger(152, 0) // want `"152" can be replaced by syslog\.LOG_LOCAL3` - _, _ = syslog.NewLogger(16, 0) // want `"16" can be replaced by syslog\.LOG_MAIL` - _, _ = syslog.NewLogger(160, 0) // want `"160" can be replaced by syslog\.LOG_LOCAL4` - _, _ = syslog.NewLogger(168, 0) // want `"168" can be replaced by syslog\.LOG_LOCAL5` - _, _ = syslog.NewLogger(176, 0) // want `"176" can be replaced by syslog\.LOG_LOCAL6` - _, _ = syslog.NewLogger(184, 0) // want `"184" can be replaced by syslog\.LOG_LOCAL7` - _, _ = syslog.NewLogger(2, 0) // want `"2" can be replaced by syslog\.LOG_CRIT` - _, _ = syslog.NewLogger(24, 0) // want `"24" can be replaced by syslog\.LOG_DAEMON` - _, _ = syslog.NewLogger(3, 0) // want `"3" can be replaced by syslog\.LOG_ERR` - _, _ = syslog.NewLogger(32, 0) // want `"32" can be replaced by syslog\.LOG_AUTH` - _, _ = syslog.NewLogger(4, 0) // want `"4" can be replaced by syslog\.LOG_WARNING` - _, _ = syslog.NewLogger(40, 0) // want `"40" can be replaced by syslog\.LOG_SYSLOG` - _, _ = syslog.NewLogger(48, 0) // want `"48" can be replaced by syslog\.LOG_LPR` - _, _ = syslog.NewLogger(5, 0) // want `"5" can be replaced by syslog\.LOG_NOTICE` - _, _ = syslog.NewLogger(56, 0) // want `"56" can be replaced by syslog\.LOG_NEWS` - _, _ = syslog.NewLogger(6, 0) // want `"6" can be replaced by syslog\.LOG_INFO` - _, _ = syslog.NewLogger(64, 0) // want `"64" can be replaced by syslog\.LOG_UUCP` - _, _ = syslog.NewLogger(7, 0) // want `"7" can be replaced by syslog\.LOG_DEBUG` - _, _ = syslog.NewLogger(72, 0) // want `"72" can be replaced by syslog\.LOG_CRON` - _, _ = syslog.NewLogger(8, 0) // want `"8" can be replaced by syslog\.LOG_USER` - _, _ = syslog.NewLogger(80, 0) // want `"80" can be replaced by syslog\.LOG_AUTHPRIV` - _, _ = syslog.NewLogger(88, 0) // want `"88" can be replaced by syslog\.LOG_FTP` -)