[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") } ``` 希望大家写代码要细心!!!

相关推荐
Lam㊣5 小时前
Ubuntu(Ubuntu 22.04.4 LTS)更改IP地址及网关
tcp/ip·ubuntu·php
BEOL贝尔科技5 小时前
通过采集器监测环境的温湿度如果这个采集器连上网络接入云平台会发生什么呢?
网络·人工智能·数据分析
wearegogog1235 小时前
基于MATLAB的D2D仿真场景实现
开发语言·网络·matlab
Godspeed Zhao6 小时前
现代智能汽车中的无线技术00——智能汽车的无线依赖
网络·汽车
独自破碎E6 小时前
【字符串分割】验证IP地址
服务器·网络·tcp/ip
数通工程师6 小时前
实操教程:华为防火墙HRP主备模式完整配置步骤
运维·服务器·网络·网络协议·tcp/ip·华为
弥生赞歌6 小时前
防御保护课程综合实验
网络
相思难忘成疾6 小时前
华为HCIP实验-BGP路由协议的配置解析
网络·华为·智能路由器·hcip
青果全球http6 小时前
2026年动态代理IP实测分享:跨境与数据采集的高性价比方案
网络·网络协议·tcp/ip
小yu学编程6 小时前
TCP协议详解
服务器·网络·tcp/ip·tcp协议·网络原理·tcp特性