flag 자체 구현
This commit is contained in:
@ -21,6 +21,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"repositories.action2quare.com/ayo/gocommon/flagx"
|
||||
"repositories.action2quare.com/ayo/gocommon/logger"
|
||||
|
||||
"github.com/pires/go-proxyproto"
|
||||
@ -84,6 +85,9 @@ func welcomeHandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("welcome"))
|
||||
}
|
||||
|
||||
var tls = flagx.String("tls", "", "")
|
||||
var portptr = flagx.Int("port", 80, "")
|
||||
|
||||
// NewHTTPServer :
|
||||
func NewHTTPServerWithPort(serveMux *http.ServeMux, port int) *Server {
|
||||
if len(*tls) > 0 && port == 80 {
|
||||
|
||||
Reference in New Issue
Block a user