Fix lint errors

This commit is contained in:
世界
2026-05-13 22:37:05 +08:00
parent 429182a349
commit a47f39fa2b
79 changed files with 219 additions and 667 deletions

View File

@@ -61,16 +61,17 @@ func geoipExport(countryCode string) error {
outputFile *os.File
outputWriter io.Writer
)
if flagGeoipExportOutput == "stdout" {
switch flagGeoipExportOutput {
case "stdout":
outputWriter = os.Stdout
} else if flagGeoipExportOutput == flagGeoipExportDefaultOutput {
case flagGeoipExportDefaultOutput:
outputFile, err = os.Create("geoip-" + countryCode + ".json")
if err != nil {
return err
}
defer outputFile.Close()
outputWriter = outputFile
} else {
default:
outputFile, err = os.Create(flagGeoipExportOutput)
if err != nil {
return err