aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2020-08-17 13:42:24 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2020-08-17 13:42:41 +0300
commit4e63c622e464b6863dfec0b6c99f95833f46b12f (patch)
treef10247ecba81e44e2c77c0fb56ea01ea086d84b1 /main.go
parent3ff29e8a4ce10559a283a2f73213ea2570547b64 (diff)
Detached AsBytes method
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 80c5f31..e48230b 100644
--- a/main.go
+++ b/main.go
@@ -44,7 +44,11 @@ func main() {
if err != nil {
return err
}
- return c.Blob(200, "image/png", img)
+ blob, err := static.AsBytes(img)
+ if err != nil {
+ return err
+ }
+ return c.Blob(200, "image/png", blob)
})
log.Fatal(e.Start(":8000"))
}