add warning using http2 example (#1009)
This commit is contained in:
		@ -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)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user