自己写的这个wrapper有考虑到本人自己的情况,所以这个wrapper不需要用户去定义现在的workspace,wrapper会通过比较现在的工作文件的绝对路径和用户在当前开发主机上的所有workspace的路径mapping比较找出working workspace。这样就省去了每次要定义P4_CLIENT的苦恼。
代码放在github上, 点这里
我也把自己用的SublimeText 2的plugin放上去了。希望对那些工作环境跟我差不多的人有所帮助。
今天终于在github上有了一个真正的自己的项目,虽然是一个很简单,很小的项目,不过还是值得纪念一下。
项目地址: https://github.com/yongzhy/goploticus
这个是libploticus的Go语言封装。
A free, GPL, non-interactive software package for producing plots, charts, and graphics from data. It was developed in a Unix/C environment and runs onvarious Unix, Linux, and win32 systems. ploticus is good for automated or just-in-time graph generation, handles date and time data nicely, and has basic statistical capabilities. It allows significant user control over colors, styles, options and details. Ploticus is a mature package, available since 1999, and version 2.40 has more than 12,000 downloads to date. Ploticus was discussed in this 2008 review on Linux.com.
因为是第一次封装C的API,折腾了一阵子才发现要让cgo编译代码,import “C” 必须是单独一行.
可以编辑的代码:
//#cgo LDFLAGS: -lploticus
//#include <libploticus.h>
//#include <stdlib.h>
import "C"
不可以被编辑的代码:
//#cgo LDFLAGS: -lploticus
//#include <libploticus.h>
//#include <stdlib.h>
import (
"C"
)
什么东西,都要试了才真正知道。