From 9817262eb89aac1860ed5fab2b0534ef398b1d03 Mon Sep 17 00:00:00 2001 From: Sheridan C Rawlins Date: Sun, 15 Dec 2024 10:58:59 -0800 Subject: [PATCH] Use embed for pixel just so it's a proper png file. --- util/httputil/pixel.go | 11 +++++------ util/httputil/pixel.png | Bin 0 -> 86 bytes 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 util/httputil/pixel.png diff --git a/util/httputil/pixel.go b/util/httputil/pixel.go index 0beefdb1924..61b10642e6a 100644 --- a/util/httputil/pixel.go +++ b/util/httputil/pixel.go @@ -1,16 +1,15 @@ package httputil +import _ "embed" + type Pixel struct { Content []byte ContentType string } +//go:embed pixel.png +var pixelContent []byte var Pixel1x1PNG = Pixel{ - Content: []byte{0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, - 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, - 0x89, 0x00, 0x00, 0x00, 0x04, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0x08, 0x7C, 0x08, 0x64, 0x88, - 0x00, 0x00, 0x00, 0x0D, 0x49, 0x44, 0x41, 0x54, 0x08, 0x99, 0x63, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x01, 0x87, 0xA1, 0x4E, 0xD4, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, - 0x42, 0x60, 0x82}, + Content: pixelContent, ContentType: "image/png", } diff --git a/util/httputil/pixel.png b/util/httputil/pixel.png new file mode 100644 index 0000000000000000000000000000000000000000..1f0f250853531602d8cd885c5c3e1c0595d8c44b GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k8}blmSQK*5Dp-y;YjHK@_9X7978x} cCMN&^kju)z*uK#33XsL%>FVdQ&MBb@081PYN&o-= literal 0 HcmV?d00001