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