From 2e2fdb3c2eeb504fa8e32c33a8b448aeaaaeed54 Mon Sep 17 00:00:00 2001 From: thinkerou Date: Wed, 12 Jul 2017 14:27:56 +0800 Subject: [PATCH] add warning using http2 example --- 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)