From 44da058aa09ea4241c37d8f92b6ac6225a4b1aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=AC=A7?= Date: Mon, 10 Jul 2017 22:21:42 +0800 Subject: [PATCH] add favicon example (#1001) --- examples/favicon/favicon.ico | Bin 0 -> 1150 bytes examples/favicon/main.go | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 examples/favicon/favicon.ico create mode 100644 examples/favicon/main.go diff --git a/examples/favicon/favicon.ico b/examples/favicon/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..3959cd7f9b13333df2f132f736c5f1d562278895 GIT binary patch literal 1150 zcmZvaZAep57{~u-FK%{oZPV!zqumdgW0lj0f*e`-B@(PiL9v7&C`hOvv*<%AsnCmM z1{IQ-Wf{?n%U;YZA+mQGi`IuSL&;vX7hRjRdwR}RV$i+(&bjCOpZ|03bM6B$x{XHA zXu~=U5Dy@Qpe@>o?9&907Ar*vum3Z+TrJ4TYEn6!ZB~b)J=Nj3J|jKdZO+d>z?Lj& z_>Uv9Ww+Nrr5c6J){<rb+kFDFx&2;ZqPs+vPbDNJxiNe8wtw=N&0AqM zcOowC@WP1`Pd?LV&T_`u9s(V?#9GE$d$rm#++a9y!(ypRwpflKCMItzha??@B<-87 z(;f9PR?mT^uRv=S;09x7Del60;CM)-s^@zB;Z{kiHbqD84*MC~Los%yRyWo#)=b{h z#QD3xRReH|V%h}LfOCC7GksU{PmQKwjaDo2mXP-%)qNq6u}&Y*MP9+}6F@NoTK@R2 zP_C|fe|5$>T2-osD8^2c?j<~Pfu3)`8}jxNo_zpKI7zsP<59r#D-m79ynF#Xumbn# z{X@j3OvZlrfgou=h@NW3g#Qq6m8hUU|CWjodXQ=udBa%0jlhHneqtnDl9WM7;#`tK zJSwVhe?o%ri~4U8^*X)&Xh zx9Du{kiWw?dGcUb7csINYBHJn)mG~eoK8P-ayVQrWot$TR|xKKe11%47^~HG!({SM zZ$F)pmNxuOXf7B3o{^zsFId1abLIf$23D`;g80HheyyN@^XzQDUzU9OoZinxyEuqKAfmpL|X4q(TQVDg3yLC>a53eU?Md^Kmz%hLJtUsn|s zegCv^qr!`egXgQOL#DDaWy~9SFd{Xz2M&iX)o%ZKv$T|#)YK?vcJ2(^FE0&)6%-lPA8Q&?sB<0v3N1ZvSkD1^X3h2@%dik{d=zVczBH0%jvIh>Q6<# zXwkPLxw(DI3kp7ra|274KB09EcI_HTuB;3gtEvM3=#7mZP**pKy?X=J%F5yR+S;FE kdSEK>WfFCrj=Hk~C=--X$BaX)h1R8x#EIB`qMMHYHxij({r~^~ literal 0 HcmV?d00001 diff --git a/examples/favicon/main.go b/examples/favicon/main.go new file mode 100644 index 00000000..5ad39331 --- /dev/null +++ b/examples/favicon/main.go @@ -0,0 +1,15 @@ +package main + +import ( + "github.com/gin-gonic/gin" + "github.com/thinkerou/favicon" +) + +func main() { + app := gin.Default() + app.Use(favicon.New("./favicon.ico")) + app.GET("/ping", func(c *gin.Context) { + c.String(200, "Hello favicon.") + }) + app.Run(":8080") +}