Skip to content

Commit 34279d6

Browse files
author
woytu
committed
修复端口参数问题
1 parent 34f7dad commit 34279d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

key-gin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ func WebRoot(c *gin.Context) {
209209
* @date 2019/6/28 15:31
210210
*/
211211
func Port() (port string) {
212-
flag.StringVar(&port, "p", ":8000", "默认端口:8000")
212+
flag.StringVar(&port, "p", "8000", "默认端口:8000")
213213
flag.Parse()
214-
return port
214+
return ":" + port
215215

216216
//if len(os.Args[1:]) == 0 {
217217
// return ":8000"

0 commit comments

Comments
 (0)