![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
go
文章平均质量分 55
程序员张小妍
相信相信的力量,努力做好自己!
展开
-
记录一个bug排查
公司对底层基础库进行了重构,线上稳定跑了几天,在查看订单系统的log时,有几条error信息非常的奇怪, orderID:80320180 statemachine error: no event [Revoked] at current state [Paid] orderID:81983045 statemachine error: no event [Refund] at current state [Revoked] 订单有状态机进行维护 已经被撤消的订单不能再进行有其他操作,和状态更改原创 2021-12-08 18:49:37 · 612 阅读 · 0 评论 -
Go与C/C++ 调用
1、Go调用C:在go文件里调C(以下代码中除了开头的注释之外,其他注释不可删除) /* * go 和 C 互调用程序 */ package main /* int Add( int a, int b ) { return a + b; } */ import "C" import ( "fmt" ) func main() { fmt.Println(C.Add(1, 2)) } 上面的C代码虽然被“注释”了,但是Go可以直接调 2、Go调用C:通过.转载 2021-07-15 11:38:47 · 1277 阅读 · 0 评论