DarthSim 5 ani în urmă
părinte
comite
4bd7b72c7a
3 a modificat fișierele cu 15 adăugiri și 2 ștergeri
  1. 13 0
      .golangci.yml
  2. 1 1
      .lefthook/pre-commit/lint
  3. 1 1
      ico_data.go

+ 13 - 0
.golangci.yml

@@ -1,3 +1,7 @@
+run:
+  skip-dirs:
+    - .tmp
+
 linters:
   fast: true
   enable:
@@ -20,3 +24,12 @@ issues:
     - linters:
         - staticcheck
       text: "SA4000:"
+
+    - path: listen(_no)?_reuseport\.go
+      linters:
+        - typecheck
+      text: "declar"
+
+    - linters:
+        - typecheck
+      text: "could not import C"

+ 1 - 1
.lefthook/pre-commit/lint

@@ -7,4 +7,4 @@ fi
 export CGO_LDFLAGS_ALLOW="-s|-w"
 export CGO_CFLAGS_ALLOW="-Xpreprocessor"
 
-golangci-lint run
+golangci-lint run ./*.go

+ 1 - 1
ico_data.go

@@ -18,7 +18,7 @@ func icoData(data []byte) (out []byte, width int, height int, err error) {
 
 	// Ensure that image is in RGBA format
 	rgba := image.NewRGBA(ico.Bounds())
-	draw.Draw(rgba, ico.Bounds(), ico, image.ZP, draw.Src)
+	draw.Draw(rgba, ico.Bounds(), ico, image.Point{}, draw.Src)
 
 	width = rgba.Bounds().Dx()
 	height = rgba.Bounds().Dy()