[GIN-debug] [ERROR] listen tcp: address 8080: missing port in address

学习Golang_gin框架的第一天

遇到一下报错 :

GIN-debug\] \[ERROR\] listen tcp: address 8080: missing port in address 错误代码 : ```Go package main import "github.com/gin-gonic/gin" func main() { router := gin.Default() router.GET("/index", func(context *gin.Context) { context.String(200, "Hello World") }) router.Run("8080") } ``` 报错原因 : 粗心 改错 : 在8080前面加上 : 符号 代码变为 : ```Go package main import "github.com/gin-gonic/gin" func main() { router := gin.Default() router.GET("/index", func(context *gin.Context) { context.String(200, "Hello World") }) router.Run(":8080") } ``` 希望大家写代码要细心!!!

相关推荐
yugi98783819 小时前
无线传感器网络中GAF算法节点特性分析
网络·算法
云小逸19 小时前
【nmap源码解析】Nmap 核心技术深度解析:从源码到实战
开发语言·网络·windows·nmap
半壶清水19 小时前
[软考网规考点笔记]-OSI参考模型与TCP/IP体系结构
网络·笔记·tcp/ip
IP搭子来一个20 小时前
2026年动态IP代理怎么选:共享好还是独享好?
服务器·网络协议·tcp/ip
网云工程师手记1 天前
DDNS-Go部署与使用体验:动态公网IP远程访问不再断
运维·服务器·网络·网络协议·网络安全
德育处主任Pro1 天前
『NAS』设置内网固定 IP
网络·网络协议·tcp/ip
特立独行的猫a1 天前
Kuikly多端框架(KMP)实战:KMP中的 Ktor 网络库的多端适配指南
android·网络·harmonyos·ktor·compose·kmp·kuikly
那就回到过去1 天前
拥塞管理和拥塞避免
运维·服务器·网络·网络协议·tcp/ip·ensp
乐悲蔚蓝湖1 天前
华三做流量统计
网络
米羊1211 天前
风险评估文档记录
开发语言·网络·php