add warning using http2 example (#1009)

This commit is contained in:
田欧 2017-07-12 15:01:46 +08:00 committed by Bo-Yi Wu
parent aa6d2d29f8
commit bbd4dfee50

View File

@ -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)