Skip to content

Commit

Permalink
chore: update example
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy committed Aug 23, 2020
1 parent 692e944 commit 74a5c07
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package main

import (
"log"
"net/http"

"github.com/gin-gonic/autotls"
"github.com/gin-gonic/gin"
Expand All @@ -27,7 +28,7 @@ func main() {

// Ping handler
r.GET("/ping", func(c *gin.Context) {
c.String(200, "pong")
c.String(http.StatusOK, "pong")
})

log.Fatal(autotls.Run(r, "example1.com", "example2.com"))
Expand All @@ -42,6 +43,7 @@ package main

import (
"log"
"net/http"

"github.com/gin-gonic/autotls"
"github.com/gin-gonic/gin"
Expand All @@ -53,7 +55,7 @@ func main() {

// Ping handler
r.GET("/ping", func(c *gin.Context) {
c.String(200, "pong")
c.String(http.StatusOK, "pong")
})

m := autocert.Manager{
Expand Down
3 changes: 2 additions & 1 deletion example/example1/example1.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"log"
"net/http"

"github.com/gin-gonic/autotls"
"github.com/gin-gonic/gin"
Expand All @@ -12,7 +13,7 @@ func main() {

// Ping handler
r.GET("/ping", func(c *gin.Context) {
c.String(200, "pong")
c.String(http.StatusOK, "pong")
})

log.Fatal(autotls.Run(r, "example1.com", "example2.com"))
Expand Down
3 changes: 2 additions & 1 deletion example/example2/example2.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"log"
"net/http"

"github.com/gin-gonic/autotls"
"github.com/gin-gonic/gin"
Expand All @@ -13,7 +14,7 @@ func main() {

// Ping handler
r.GET("/ping", func(c *gin.Context) {
c.String(200, "pong")
c.String(http.StatusOK, "pong")
})

m := autocert.Manager{
Expand Down

0 comments on commit 74a5c07

Please sign in to comment.