Go语言中文网 为您找到相关结果 23

golang append时slice len 和 cap

声明: 源slice= src 添加slice = app 结果slice=tar append时 len tar === len src + len app 1)如果len(src) + len(app) <= cap(src) cap tar = cap(src) 2)否则 a) len(src) + len(app) > 2* cap(src) cap tar = len(src) + len(app) b) cap(src) < len(src) + len(app) <= 2* cap(src) cap tar = 2* cap(src) data := make([]int, 10, 20) data[0] = 1 data[1] = 2 dataappend := make([...阅读全文

博文 2014-10-04 19:27:08 咖啡伴侣

求助:error: goland --build constraints exclude all Go files in

**go env** ``` set GOARCH=386 //这部分是我修改的 修改之前为amd64 set GOBIN= set GOCACHE=C:\Users\Administrator\AppData\Local\go-build set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=F:\centos64_share\cobra_engine\windows\02_sdk_windows_32;F:\centos64_share set GORACE= set GOROOT=C:\Go set GOTMPDIR= set GOTOOLD...阅读全文

对 u-boou1.1.6的do_go修改(最好不动)

common/cmd_boot.c int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { ulong addr, rc; int rcode = 0; if (argc < 2) { printf ("Usage:\n%s\n", cmdtp->usage); return 1; } addr = simple_strtoul(argv[1], NULL, 16); printf ("## Starting application at 0x%08lX ...\n", addr); /**jimmy addd the below 3 lines*/ setup_linux_param(0x30000100); cal...阅读全文

博文 2015-12-22 04:00:00 conjimmy