mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-24 02:32:17 +08:00
Avoid pulling in any external example dependencies, when using go get. Go tools ignore folders with names which start with `_`.
20 lines
275 B
Go
20 lines
275 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/gin-gonic/autotls"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func main() {
|
|
r := gin.Default()
|
|
|
|
// Ping handler
|
|
r.GET("/ping", func(c *gin.Context) {
|
|
c.String(200, "pong")
|
|
})
|
|
|
|
log.Fatal(autotls.Run(r, "example1.com", "example2.com"))
|
|
}
|