From bbd4dfee5056087c640a75c6cc21567f4f47585d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=AC=A7?= Date: Wed, 12 Jul 2017 15:01:46 +0800 Subject: [PATCH] add warning using http2 example (#1009) --- examples/http2/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/http2/main.go b/examples/http2/main.go index 19e65f84..07df01e2 100644 --- a/examples/http2/main.go +++ b/examples/http2/main.go @@ -2,6 +2,8 @@ package main import ( "html/template" + "log" + "os" "github.com/gin-gonic/gin" ) @@ -18,6 +20,9 @@ var html = template.Must(template.New("https").Parse(` `)) func main() { + logger := log.New(os.Stderr, "", 0) + logger.Println("[WARNING] DON'T USE THE EMBED CERTS FROM THIS EXAMPLE IN PRODUCTION ENVIRONMENT, GENERATE YOUR OWN!") + r := gin.Default() r.SetHTMLTemplate(html)