草庐IT

NanoSeconds

全部标签

gateway启动报错记录nacos远程连接的坑: Waited 3000 milliseconds (plus 4100 nanoseconds delay)

c.a.n.c.remote.client.grpc.GrpcClient  :Servercheckfail,pleasecheckserverlocalhost,port9848isavailable,error={}gateway启动报错记录nacos远程连接的坑:Waited3000milliseconds(plus4100nanosecondsdelay)原因是配置文件配置错误不要用localhost,要用具体的ipnacos:addr:localhost:8848 

go - strconv.Itoa(time.Nanoseconds()) - 错误

我写了这样的一次性代码,strconv.Itoa(time.Nanoseconds())。但是,它给我这个错误“不能使用time.Nanoseconds()(类型int64)作为函数参数中的类型int”。我该如何解决这个问题? 最佳答案 例如,packagemainimport("fmt""strconv""time")funcmain(){t:=strconv.FormatInt(time.Nanoseconds(),10)fmt.Println(t)}输出:1322756865962046000
12